Skip to content
This repository has been archived by the owner on Aug 27, 2024. It is now read-only.

Commit

Permalink
Merge pull request #40 from fechan/data-update-10.0.0.2
Browse files Browse the repository at this point in the history
Update data for 10.0.0.2 and new data pipeline
  • Loading branch information
fechan authored Nov 23, 2022
2 parents d67aab9 + f8d693b commit 20fb4d8
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 76 deletions.
136 changes: 79 additions & 57 deletions Data/JJAreaPOI.lua

Large diffs are not rendered by default.

15 changes: 10 additions & 5 deletions Data/JJTaxiNodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ addon.JJTaxiNodes = {
[2797]={["Name_lang"]="Emberwatch, Ohn'ahran Plains",["Pos0"]=147.856,["Pos1"]=1759.92,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2798]={["Name_lang"]="Pinewood Post, Ohn'ahran Plains",["Pos0"]=-1504.53,["Pos1"]=727.177,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2799]={["Name_lang"]="Rusza'thar Reach, Ohn'ahran Plains",["Pos0"]=-444.337,["Pos1"]=407.776,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2800]={["Name_lang"]="Apex Canopy, The Waking Shores",["Pos0"]=652.896,["Pos1"]=3258.6,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2800]={["Name_lang"]="Uktulut Outpost, The Waking Shores",["Pos0"]=652.896,["Pos1"]=3258.6,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2801]={["Name_lang"]="Apex Observatory, The Waking Shores",["Pos0"]=949.517,["Pos1"]=2758.06,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2802]={["Name_lang"]="Obsidian Throne, The Waking Shores",["Pos0"]=2337.28,["Pos1"]=2635.61,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2803]={["Name_lang"]="Uktulut Pier, The Waking Shores",["Pos0"]=3908.18,["Pos1"]=997.292,["ContinentID"]=2444,["H"]=1,["A"]=1},
Expand All @@ -900,12 +900,17 @@ addon.JJTaxiNodes = {
[2817]={["Name_lang"]="Skytop Observatory, The Waking Shores",["Pos0"]=2610.12,["Pos1"]=-1153.98,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2818]={["Name_lang"]="Vault of the Incarnates, Thaldraszus",["Pos0"]=394.649,["Pos1"]=-4186.89,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2825]={["Name_lang"]="Ohn'iri Springs, Ohn'ahran Plains",["Pos0"]=-2444.62,["Pos1"]=2524.7,["ContinentID"]=2444,["H"]=1,["A"]=1},
[2834]={["Name_lang"]="Eon's Fringe, Thaldraszus",["Pos0"]=-1095.59,["Pos1"]=-2180.02,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2836]={["Name_lang"]="Algeth'era, Thaldraszus",["Pos0"]=1474.82,["Pos1"]=-3200.07,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2834]={["Name_lang"]="Eon's Fringe, Thaldraszus",["Pos0"]=-1094.86,["Pos1"]=-2180.94,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2836]={["Name_lang"]="Algeth'era, Thaldraszus",["Pos0"]=1474.7,["Pos1"]=-3201.79,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2837]={["Name_lang"]="Vakthros, Azure Span",["Pos0"]=-3162.35,["Pos1"]=-2953.38,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2838]={["Name_lang"]="Cobalt Assembly, Azure Span",["Pos0"]=-3115.81,["Pos1"]=231.807,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2838]={["Name_lang"]="Cobalt Assembly, Azure Span",["Pos0"]=-3116.16,["Pos1"]=230.263,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2839]={["Name_lang"]="Rusza'thar Reach, Ohn'ahran Plains",["Pos0"]=-546.64,["Pos1"]=662.31,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2840]={["Name_lang"]="Shady Sanctuary, Ohn'ahran Plains",["Pos0"]=-1379.76,["Pos1"]=4499.69,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2841]={["Name_lang"]="Skytop Observatory, The Waking Shores",["Pos0"]=2339.44,["Pos1"]=-1351.98,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2842]={["Name_lang"]="Rubyscale Outpost, The Waking Shores",["Pos0"]=568.223,["Pos1"]=882.838,["ContinentID"]=2444,["H"]=0,["A"]=0}
[2842]={["Name_lang"]="Rubyscale Outpost, The Waking Shores",["Pos0"]=568.223,["Pos1"]=882.838,["ContinentID"]=2444,["H"]=0,["A"]=0},
[2847]={["Name_lang"]="Maruukai, The Nokhud Offensive",["Pos0"]=-704.672,["Pos1"]=2047.51,["ContinentID"]=2516,["H"]=1,["A"]=1},
[2848]={["Name_lang"]="The Nokhud Approach, The Nokhud Offensive",["Pos0"]=-663.998,["Pos1"]=3296.38,["ContinentID"]=2516,["H"]=1,["A"]=1},
[2849]={["Name_lang"]="The Battle of Spears, The Nokhud Offensive",["Pos0"]=-1019.81,["Pos1"]=1268.85,["ContinentID"]=2516,["H"]=1,["A"]=1},
[2850]={["Name_lang"]="Teerakai, The Nokhud Offensive",["Pos0"]=-1671.03,["Pos1"]=3790.14,["ContinentID"]=2516,["H"]=1,["A"]=1},
[2851]={["Name_lang"]="Ohn'iri Springs, The Nokhud Offensive",["Pos0"]=-2445.67,["Pos1"]=2528.07,["ContinentID"]=2516,["H"]=1,["A"]=1}
}
16 changes: 15 additions & 1 deletion Data/JJTaxiPath.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3521,5 +3521,19 @@ addon.JJTaxiPath = {
[3518]={["FromTaxiNode"]=2815,["ToTaxiNode"]=2811,["Distance"]=1763.0},
[3519]={["FromTaxiNode"]=2816,["ToTaxiNode"]=2811,["Distance"]=1038.0},
[3520]={["FromTaxiNode"]=2818,["ToTaxiNode"]=2811,["Distance"]=2247.0},
[3521]={["FromTaxiNode"]=2816,["ToTaxiNode"]=2812,["Distance"]=288.0}
[3521]={["FromTaxiNode"]=2816,["ToTaxiNode"]=2812,["Distance"]=288.0},
[3522]={["FromTaxiNode"]=2847,["ToTaxiNode"]=2849,["Distance"]=840.0},
[3523]={["FromTaxiNode"]=2851,["ToTaxiNode"]=2849,["Distance"]=1902.0},
[3524]={["FromTaxiNode"]=2847,["ToTaxiNode"]=2851,["Distance"]=1806.0},
[3525]={["FromTaxiNode"]=2849,["ToTaxiNode"]=2851,["Distance"]=1902.0},
[3526]={["FromTaxiNode"]=2850,["ToTaxiNode"]=2851,["Distance"]=1481.0},
[3527]={["FromTaxiNode"]=2847,["ToTaxiNode"]=2850,["Distance"]=1993.0},
[3528]={["FromTaxiNode"]=2851,["ToTaxiNode"]=2850,["Distance"]=1481.0},
[3529]={["FromTaxiNode"]=2848,["ToTaxiNode"]=2850,["Distance"]=1122.0},
[3530]={["FromTaxiNode"]=2847,["ToTaxiNode"]=2848,["Distance"]=1250.0},
[3531]={["FromTaxiNode"]=2850,["ToTaxiNode"]=2848,["Distance"]=1122.0},
[3532]={["FromTaxiNode"]=2849,["ToTaxiNode"]=2847,["Distance"]=840.0},
[3533]={["FromTaxiNode"]=2851,["ToTaxiNode"]=2847,["Distance"]=1806.0},
[3534]={["FromTaxiNode"]=2850,["ToTaxiNode"]=2847,["Distance"]=1993.0},
[3535]={["FromTaxiNode"]=2848,["ToTaxiNode"]=2847,["Distance"]=1250.0}
}
22 changes: 11 additions & 11 deletions DataProcessing/process_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@

import pandas as pd

RAW_DATA_DIR = "./raw-csv-data"
RAW_DATA_DIR = "../../wow-retail-db2/dbfilesclient/"
OUT_DATA_DIR = "./processed-csv-data"

# Map: Continents (and instances?). We will need this for a lot of things.
# Map.MapDescription0_lang is for the Horde, and MapDescription1_lang is for the Alliance
# Map.ExpansionID is expansion ID (e.g. 7 is BfA)
Map = pd.read_csv(f"{RAW_DATA_DIR}/Map.csv", usecols=["ID", "MapName_lang", "InstanceType"])
Map = pd.read_csv(f"{RAW_DATA_DIR}/map.csv", usecols=["ID", "MapName_lang", "InstanceType"])
Map.to_csv(f"{OUT_DATA_DIR}/JJMap.csv", index=False)

### Process AreaTable + AreaPOI --> JJAreaPOI

# AreaTable: Zones (and other locations)
AreaTable = pd.read_csv(f"{RAW_DATA_DIR}/AreaTable.csv", usecols=["ID", "AreaName_lang"])
AreaTable = pd.read_csv(f"{RAW_DATA_DIR}/areatable.csv", usecols=["ID", "AreaName_lang"])
# AreaPOI: Points of interest
AreaPOI = pd.read_csv(f"{RAW_DATA_DIR}/AreaPOI.csv", usecols=["Name_lang", "Description_lang", "Pos[0]", "Pos[1]", "ContinentID", "AreaID"])
AreaPOI = pd.read_csv(f"{RAW_DATA_DIR}/areapoi.csv", usecols=["Name_lang", "Description_lang", "Pos[0]", "Pos[1]", "ContinentID", "AreaID"])

JJAreaPOI = (AreaPOI.merge(AreaTable, how="left", left_on="AreaID", right_on="ID")
.drop(labels=["ID", "AreaID"], axis=1))
Expand All @@ -31,7 +31,7 @@
### Process TaxiNodes --> JJTaxiNodes

# TaxiNodes: Flight points
TaxiNodes = pd.read_csv(f"{RAW_DATA_DIR}/TaxiNodes.csv", usecols=["ID", "Name_lang", "Pos[0]", "Pos[1]", "ContinentID", "MountCreatureID[0]", "MountCreatureID[1]"])
TaxiNodes = pd.read_csv(f"{RAW_DATA_DIR}/taxinodes.csv", usecols=["ID", "Name_lang", "Pos[0]", "Pos[1]", "ContinentID", "MountCreatureID[0]", "MountCreatureID[1]"])
JJTaxiNodes = TaxiNodes[~TaxiNodes.Name_lang.str.startswith("Quest")] # Guessing that these flight points only show up for quests
JJTaxiNodes = JJTaxiNodes[~JJTaxiNodes.Name_lang.str.startswith("[Hidden]")]
JJTaxiNodes = JJTaxiNodes[~JJTaxiNodes.Name_lang.str.startswith("[HIDDEN]")]
Expand All @@ -44,7 +44,7 @@
JJTaxiNodes.to_csv(f"{OUT_DATA_DIR}/JJTaxiNodes.csv", index=True)

### Process TaxiPath (for directions feature)
TaxiPath = pd.read_csv(f"{RAW_DATA_DIR}/TaxiPath.csv", usecols=["ID", "FromTaxiNode", "ToTaxiNode"])
TaxiPath = pd.read_csv(f"{RAW_DATA_DIR}/taxipath.csv", usecols=["ID", "FromTaxiNode", "ToTaxiNode"])

TaxiNode_merge = JJTaxiNodes.copy()
TaxiNode_merge.columns = JJTaxiNodes.columns.map(lambda x: str(x) + '_from')
Expand All @@ -70,9 +70,9 @@ def distance(x1, y1, x2, y2):
# since we need them separately anyway during the walking/cross-join part

# WaypointNode: Portal entrances and exits
WaypointNode = pd.read_csv(f"{RAW_DATA_DIR}/WaypointNode.csv", usecols=["ID", "Name_lang", "SafeLocID", "Field_8_2_0_30080_005"])
WaypointNode = pd.read_csv(f"{RAW_DATA_DIR}/waypointnode.csv", usecols=["ID", "Name_lang", "SafeLocID", "Field_8_2_0_30080_005"])
# WaypointSafeLocs: Locations of portals
WaypointSafeLocs = pd.read_csv(f"{RAW_DATA_DIR}/WaypointSafeLocs.csv").drop(columns="Pos[2]")
WaypointSafeLocs = pd.read_csv(f"{RAW_DATA_DIR}/waypointsafelocs.csv").drop(columns="Pos[2]")

WaypointNode_Loc = (pd.merge(WaypointNode, WaypointSafeLocs,
how="inner", # exclude portals that don't have a set location (e.g. mage portals)
Expand All @@ -84,18 +84,18 @@ def distance(x1, y1, x2, y2):
WaypointNode_Loc.to_csv(f"{OUT_DATA_DIR}/JJWaypointNode.csv", index=False)

# WaypointEdge: Portal connections
WaypointEdge = pd.read_csv(f"{RAW_DATA_DIR}/WaypointEdge.csv", usecols=["Start", "End", "PlayerConditionID"])
WaypointEdge = pd.read_csv(f"{RAW_DATA_DIR}/waypointedge.csv", usecols=["Start", "End", "PlayerConditionID"])

# remove edges that involve start or end points not in the WaypointNode_Loc table (removes mage portal edges etc.)
WaypointEdgeReduced = WaypointEdge[WaypointEdge.Start.isin(WaypointNode_Loc.ID) & WaypointEdge.End.isin(WaypointNode_Loc.ID)]
WaypointEdgeReduced.to_csv(f"{OUT_DATA_DIR}/JJWaypointEdge.csv", index=False)

# PlayerCondition: Prerequisites for using a portal connection/taxi node/etc. Keep this separate from the WaypointEdge because otherwise
# there would be a lot of duplicate data
PlayerCondition = pd.read_csv(f"{RAW_DATA_DIR}/PlayerCondition.csv", usecols=["ID", "RaceMask"])
PlayerCondition = pd.read_csv(f"{RAW_DATA_DIR}/playercondition.csv", usecols=["ID", "RaceMask"])
PlayerCondition_edgeonly = PlayerCondition[PlayerCondition.ID.isin(WaypointEdge.PlayerConditionID)]

ChrRaces = pd.read_csv(f"{RAW_DATA_DIR}/ChrRaces.csv", usecols=["ID", "PlayableRaceBit"])
ChrRaces = pd.read_csv(f"{RAW_DATA_DIR}/chrraces.csv", usecols=["ID", "PlayableRaceBit"])
ChrRaces = ChrRaces[ChrRaces["PlayableRaceBit"] != -1]

def in_race_bit_mask(bitmask, raceID):
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# JackJack
Adds TomTom waypoints based on location name. Locations and their coordinates are based on data from [WoW.tools](https://wow.tools/).
Adds TomTom waypoints based on location name. Locations, coordinates, and other data are extracted directly from WoW.

Don't know where Kalimgrimmardrassil is? Now you don't have to waste time searching on Google where everything is and just add a waypoint directly there!

Expand Down
2 changes: 1 addition & 1 deletion update_data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

# RUN THIS IN THE PROJECT ROOT
cd ./DataProcessing &&
./get_csv.sh &&
#./get_csv.sh &&
./process_csv.py &&
./convert_to_lua.sh

0 comments on commit 20fb4d8

Please sign in to comment.