{ "cells": [ { "cell_type": "code", "execution_count": 93, "id": "8eac6073", "metadata": {}, "outputs": [], "source": [ "import sqlite3\n", "\n", "import pandas as pd\n", "import plotly.io as pio\n", "from plotly import express as px\n", "\n", "pio.renderers.default = \"plotly_mimetype+notebook_connected\"" ] }, { "cell_type": "code", "execution_count": 94, "id": "b5fca0c7", "metadata": {}, "outputs": [], "source": [ "db_file = \"thaumaturge_dpr.db\"\n", "\n", "\n", "def query(query: str) -> pd.DataFrame:\n", " con = sqlite3.connect(db_file)\n", " df = pd.read_sql_query(query, con)\n", " con.close()\n", " return df" ] }, { "cell_type": "code", "execution_count": 95, "id": "033c5462", "metadata": {}, "outputs": [], "source": [ "seed_query = \"\"\"\n", "DROP TABLE IF EXISTS player;\n", "CREATE TABLE player (\n", " level INTEGER,\n", " charisma INTEGER,\n", " strength INTEGER,\n", " esoteric_lore_training INTEGER,\n", " weapon_proficiency INTEGER,\n", " weapon_specialization INTEGER,\n", " weapon_tracking INTEGER,\n", " weapon_damage_dice INTEGER\n", ");\n", "INSERT INTO player (\n", " level,\n", " charisma,\n", " strength,\n", " esoteric_lore_training,\n", " weapon_proficiency,\n", " weapon_specialization,\n", " weapon_tracking,\n", " weapon_damage_dice\n", ") VALUES\n", "(1,4,3,2,2,0,0,1),\n", "(2,4,3,2,2,0,1,1),\n", "(3,4,3,4,2,0,1,1),\n", "(4,4,3,4,2,0,1,2),\n", "(5,4,4,4,4,2,1,2),\n", "(6,4,4,4,4,2,1,2),\n", "(7,4,4,6,4,2,1,2),\n", "(8,4,4,6,4,2,1,2),\n", "(9,4,4,6,4,2,1,2),\n", "(10,5,4,6,4,2,2,2),\n", "(11,5,4,6,4,2,2,2),\n", "(12,5,4,6,4,2,2,3),\n", "(13,5,4,6,6,3,2,3),\n", "(14,5,4,6,6,3,2,3),\n", "(15,5,5,8,6,3,2,3),\n", "(16,5,5,8,6,3,3,3),\n", "(17,5,5,8,6,3,3,3),\n", "(18,5,5,8,6,3,3,3),\n", "(19,5,5,8,6,3,3,4),\n", "(20,6,5,8,6,3,3,4);\n", "\n", "DROP TABLE IF EXISTS monster;\n", "CREATE TABLE monster (\n", " level INTEGER,\n", " extreme_ac INTEGER,\n", " hard_ac INTEGER,\n", " moderate_ac INTEGER,\n", " low_ac INTEGER,\n", " dc INTEGER\n", ");\n", "delete from monster\n", ";\n", "INSERT INTO monster (level, extreme_ac, hard_ac, moderate_ac, low_ac, dc)\n", "VALUES\n", "(0,19,16,15,13,14),\n", "(1,19,16,15,13,15),\n", "(2,21,18,17,15,16),\n", "(3,22,19,18,16,18),\n", "(4,24,21,20,18,19),\n", "(5,25,22,21,19,20),\n", "(6,27,24,23,21,22),\n", "(7,28,25,24,22,23),\n", "(8,30,27,26,24,24),\n", "(9,31,28,27,25,26),\n", "(10,33,30,29,27,27),\n", "(11,34,31,30,28,28),\n", "(12,36,33,32,30,30),\n", "(13,37,34,33,31,31),\n", "(14,39,36,35,33,32),\n", "(15,40,37,36,34,34),\n", "(16,42,39,38,36,35),\n", "(17,43,40,39,37,36),\n", "(18,45,42,41,39,38),\n", "(19,46,43,42,40,39),\n", "(20,48,45,44,42,40),\n", "(21,49,46,45,43,42),\n", "(22,51,48,47,45,44),\n", "(23,52,49,48,46,46),\n", "(24,54,51,50,48,48);\n", "\n", "DROP TABLE IF EXISTS level_diff;\n", "CREATE TABLE level_diff (\n", " value INTEGER\n", ");\n", "INSERT INTO level_diff\n", "(value)\n", "VALUES\n", "(-4),\n", "(-3),\n", "(-2),\n", "(-1),\n", "(0),\n", "(1),\n", "(2),\n", "(3),\n", "(4);\n", "\n", "\n", "DROP TABLE IF EXISTS weapon_die;\n", "CREATE TABLE weapon_die (\n", " die TEXT,\n", " value DECIMAL(1,2)\n", ");\n", "INSERT INTO weapon_die\n", "(die, value)\n", "VALUES\n", "('d4', '2.5'),\n", "('d6', '3.5'),\n", "('d8', '4.5'),\n", "('d10', '5.5')\n", "\"\"\"\n", "\n", "con = sqlite3.connect(db_file)\n", "with con:\n", " for q in seed_query.split(\";\"):\n", " con.execute(q + \";\")\n", "con.close()" ] }, { "cell_type": "code", "execution_count": 96, "id": "a9ea4e4d", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Monster Level=%{x}
Monster DC=%{y}", "legendgroup": "", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "Dg8QEhMUFhcYGhscHh8gIiMkJicoKiwuMA==", "dtype": "i1" }, "yaxis": "y" } ], "layout": { "legend": { "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Monster DC by Level" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Monster Level" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Monster DC" } } } }, "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# | label: monster-dc\n", "\n", "q = \"select level, dc from monster order by level\"\n", "df = query(q)\n", "fig = px.line(\n", " df,\n", " x=\"level\",\n", " y=\"dc\",\n", " labels={\"level\": \"Monster Level\", \"dc\": \"Monster DC\"},\n", " title=\"Monster DC by Level\",\n", " markers=True,\n", ")\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 97, "id": "26c2fd6a", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Tier=extreme_ac
Monster Level=%{x}
Monster AC=%{y}", "legendgroup": "extreme_ac", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "extreme_ac", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "ExMVFhgZGxweHyEiJCUnKCorLS4wMTM0Ng==", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Tier=hard_ac
Monster Level=%{x}
Monster AC=%{y}", "legendgroup": "hard_ac", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "hard_ac", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "EBASExUWGBkbHB4fISIkJScoKistLjAxMw==", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Tier=moderate_ac
Monster Level=%{x}
Monster AC=%{y}", "legendgroup": "moderate_ac", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "moderate_ac", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "Dw8REhQVFxgaGx0eICEjJCYnKSosLS8wMg==", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Tier=low_ac
Monster Level=%{x}
Monster AC=%{y}", "legendgroup": "low_ac", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "low_ac", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "DQ0PEBITFRYYGRscHh8hIiQlJygqKy0uMA==", "dtype": "i1" }, "yaxis": "y" } ], "layout": { "legend": { "title": { "text": "Tier" }, "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Monster AC by Level" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Monster Level" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Monster AC" } } } }, "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# | label: monster-ac\n", "\n", "q = \"select level, extreme_ac, hard_ac, moderate_ac, low_ac from monster order by level\"\n", "df = query(q)\n", "df = df.melt(id_vars=[\"level\"], var_name=\"tier\", value_name=\"ac\")\n", "fig = px.line(\n", " df,\n", " x=\"level\",\n", " y=\"ac\",\n", " color=\"tier\",\n", " labels={\"level\": \"Monster Level\", \"ac\": \"Monster AC\", \"tier\": \"Tier\"},\n", " title=\"Monster AC by Level\",\n", " markers=True,\n", ")\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 98, "id": "398952ee", "metadata": {}, "outputs": [], "source": [ "level_diff_cte = \"\"\"\n", "level_diff as \"\"\"" ] }, { "cell_type": "code", "execution_count": 99, "id": "72796099", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Player - monster level=-4
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "-4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-4", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "DQ4MDA0NCwwMCwwMDA0LCwwNDg4=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-3
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "-3", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-3", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "DAwLCwsMCgoLCgoLCwsKCgoLDAw=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-2
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "-2", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-2", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CwsJCgoKCQkJCQkJCgoICQkJCgo=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-1
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "-1", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-1", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CQoICAkJBwgIBwgICAkHBwgICAg=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=0
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "0", "line": { "color": "#FFA15A", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "0", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CAgHBwcIBgYHBgYHBwcGBgYHBwY=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=1
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "1", "line": { "color": "#19d3f3", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "1", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "BwcFBgYGBQUFBQUFBgYEBQUFBgU=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=2
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "2", "line": { "color": "#FF6692", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "2", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AgMEBQYHCAkKCwwNDg8QERITFA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "BgQEBQUDBAQDBAQEBQMDBAQEBA==", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=3
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "3", "line": { "color": "#B6E880", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "3", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AwQFBgcICQoLDA0ODxAREhMU", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AwMDBAICAwICAwMDAgICAwMC", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=4
Player level=%{x}
d20 success minimum=%{y}", "legendgroup": "4", "line": { "color": "#FF97FF", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "4", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "BAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AgICAQEBAQEBAgIAAQEBAgE=", "dtype": "i1" }, "yaxis": "y" } ], "layout": { "legend": { "title": { "text": "Player - monster level" }, "tracegroupgap": 0 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Exploit vulnerability success rate by player and monster level" }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Player level" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "d20 success minimum" } } } }, "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# | label: exploit-vulnerability\n", "\n", "q = \"\"\"\n", "select\n", " level_diff.value as level_diff,\n", " player.level as level,\n", " monster.dc - player.level - player.charisma - player.esoteric_lore_training as success,\n", " monster.dc + 10 - player.level - player.charisma - player.esoteric_lore_training as critical\n", "from level_diff\n", "cross join player\n", "join monster on player.level - level_diff.value = monster.level\n", "\"\"\"\n", "df = query(q)\n", "fig = px.line(\n", " df,\n", " x=\"level\",\n", " y=\"success\",\n", " color=\"level_diff\",\n", " labels={\n", " \"level\": \"Player level\",\n", " \"success\": \"d20 success minimum\",\n", " \"level_diff\": \"Player - monster level\",\n", " },\n", " title=\"Exploit vulnerability success rate by player and monster level\",\n", " markers=True,\n", ")\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 100, "id": "76abc40b", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Player - monster level=-4
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-4", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "BAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "CQUGBgcHBwcIBgcGBgYHBwg=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=-4
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "BAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "BgIDAwQEBAQFAwQDAwMEBAU=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=-4
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "BAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "BQECAgMDAwMEAgMCAgIDAwQ=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-4
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "BAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "A/8AAAEBAQECAAEAAAABAQI=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=-3
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-3", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-3", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AwQFBgcICQoLDA0ODxAREhMU", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "CgkHBwgICQgJCQgICAcICAkJ", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=-3
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-3", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AwQFBgcICQoLDA0ODxAREhMU", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "BwYEBAUFBgUGBgUFBQQFBQYG", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=-3
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-3", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AwQFBgcICQoLDA0ODxAREhMU", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "BgUDAwQEBQQFBQQEBAMEBAUF", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-3
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-3", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AwQFBgcICQoLDA0ODxAREhMU", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "BAMBAQICAwIDAwICAgECAgMD", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=-2
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-2", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-2", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AgMEBQYHCAkKCwwNDg8QERITFA==", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "CwoLCAkJCgoKCgsJCgkJCQoKCw==", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=-2
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-2", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AgMEBQYHCAkKCwwNDg8QERITFA==", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "CAcIBQYGBwcHBwgGBwYGBgcHCA==", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=-2
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-2", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AgMEBQYHCAkKCwwNDg8QERITFA==", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "BwYHBAUFBgYGBgcFBgUFBQYGBw==", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-2
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-2", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AgMEBQYHCAkKCwwNDg8QERITFA==", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "BQQFAgMDBAQEBAUDBAMDAwQEBQ==", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=-1
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-1", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-1", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "DQsMDAoKCwsMCwwMCwsLCgsLDAw=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=-1
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-1", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "CggJCQcHCAgJCAkJCAgIBwgICQk=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=-1
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-1", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CQcICAYGBwcIBwgIBwcHBgcHCAg=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=-1
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "-1", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "-1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "BwUGBgQEBQUGBQYGBQUFBAUFBgY=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=0
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "0", "line": { "color": "#FFA15A", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "0", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "DQ0NDgsMDA0NDQ0ODA0MDAwNDQ4=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=0
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "0", "line": { "color": "#FFA15A", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "0", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "CgoKCwgJCQoKCgoLCQoJCQkKCgs=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=0
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "0", "line": { "color": "#FFA15A", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "0", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CQkJCgcICAkJCQkKCAkICAgJCQo=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=0
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "0", "line": { "color": "#FFA15A", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "0", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "BwcHCAUGBgcHBwcIBgcGBgYHBwg=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=1
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "1", "line": { "color": "#19d3f3", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "1", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "Dw4PDw0NDg4PDg8PDg4ODQ4ODw8=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=1
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "1", "line": { "color": "#19d3f3", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "DAsMDAoKCwsMCwwMCwsLCgsLDAw=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=1
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "1", "line": { "color": "#19d3f3", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "CwoLCwkJCgoLCgsLCgoKCQoKCws=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=1
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "1", "line": { "color": "#19d3f3", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "1", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "CQgJCQcHCAgJCAkJCAgIBwgICQk=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=2
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "2", "line": { "color": "#FF6692", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "2", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "EBAQEQ4PDxAQEBARDxAPDw8QEBE=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=2
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "2", "line": { "color": "#FF6692", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "DQ0NDgsMDA0NDQ0ODA0MDAwNDQ4=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=2
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "2", "line": { "color": "#FF6692", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "DAwMDQoLCwwMDAwNCwwLCwsMDA0=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=2
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "2", "line": { "color": "#FF6692", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "2", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "CgoKCwgJCQoKCgoLCQoJCQkKCgs=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=3
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "3", "line": { "color": "#B6E880", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "3", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "EhESEhAQERESERISEREREBEREhI=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=3
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "3", "line": { "color": "#B6E880", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "Dw4PDw0NDg4PDg8PDg4ODQ4ODw8=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=3
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "3", "line": { "color": "#B6E880", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "Dg0ODgwMDQ0ODQ4ODQ0NDA0NDg4=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=3
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "3", "line": { "color": "#B6E880", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "3", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "DAsMDAoKCwsMCwwMCwsLCgsLDAw=", "dtype": "i1" }, "yaxis": "y2" }, { "hovertemplate": "Player - monster level=4
tier=extreme
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "4", "line": { "color": "#FF97FF", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "4", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x3", "y": { "bdata": "ExMTFBESEhMTExMUEhMSEhITExQ=", "dtype": "i1" }, "yaxis": "y3" }, { "hovertemplate": "Player - monster level=4
tier=hard
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "4", "line": { "color": "#FF97FF", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x4", "y": { "bdata": "EBAQEQ4PDxAQEBARDxAPDw8QEBE=", "dtype": "i1" }, "yaxis": "y4" }, { "hovertemplate": "Player - monster level=4
tier=moderate
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "4", "line": { "color": "#FF97FF", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "Dw8PEA0ODg8PDw8QDg8ODg4PDxA=", "dtype": "i1" }, "yaxis": "y" }, { "hovertemplate": "Player - monster level=4
tier=low
Player Level=%{x}
d20 success minimum=%{y}", "legendgroup": "4", "line": { "color": "#FF97FF", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "4", "orientation": "v", "showlegend": false, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x2", "y": { "bdata": "DQ0NDgsMDA0NDQ0ODA0MDAwNDQ4=", "dtype": "i1" }, "yaxis": "y2" } ], "layout": { "annotations": [ { "font": {}, "showarrow": false, "text": "tier=moderate", "x": 0.245, "xanchor": "center", "xref": "paper", "y": 0.46499999999999997, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "tier=low", "x": 0.755, "xanchor": "center", "xref": "paper", "y": 0.46499999999999997, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "tier=extreme", "x": 0.245, "xanchor": "center", "xref": "paper", "y": 0.9999999999999999, "yanchor": "bottom", "yref": "paper" }, { "font": {}, "showarrow": false, "text": "tier=hard", "x": 0.755, "xanchor": "center", "xref": "paper", "y": 0.9999999999999999, "yanchor": "bottom", "yref": "paper" } ], "legend": { "title": { "text": "Player - monster level" }, "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "xaxis": { "anchor": "y", "domain": [ 0, 0.49 ], "title": { "text": "Player Level" } }, "xaxis2": { "anchor": "y2", "domain": [ 0.51, 1 ], "matches": "x", "title": { "text": "Player Level" } }, "xaxis3": { "anchor": "y3", "domain": [ 0, 0.49 ], "matches": "x", "showticklabels": false }, "xaxis4": { "anchor": "y4", "domain": [ 0.51, 1 ], "matches": "x", "showticklabels": false }, "yaxis": { "anchor": "x", "domain": [ 0, 0.46499999999999997 ], "title": { "text": "d20 success minimum" } }, "yaxis2": { "anchor": "x2", "domain": [ 0, 0.46499999999999997 ], "matches": "y", "showticklabels": false }, "yaxis3": { "anchor": "x3", "domain": [ 0.5349999999999999, 0.9999999999999999 ], "matches": "y", "title": { "text": "d20 success minimum" } }, "yaxis4": { "anchor": "x4", "domain": [ 0.5349999999999999, 0.9999999999999999 ], "matches": "y", "showticklabels": false } } }, "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# | label: strike\n", "\n", "q = \"\"\"\n", "with\n", " player_attack as (\n", " select\n", " level,\n", " player.level\n", " + player.strength\n", " + player.weapon_proficiency\n", " + player.weapon_tracking as attack_bonus\n", " from player\n", " )\n", "select\n", " level_diff.value as level_diff,\n", " player.level as level,\n", " monster.extreme_ac - player.attack_bonus as extreme,\n", " monster.hard_ac - player.attack_bonus as hard,\n", " monster.moderate_ac - player.attack_bonus as moderate,\n", " monster.low_ac - player.attack_bonus as low\n", "from level_diff\n", "cross join player_attack as player\n", "join monster on player.level + level_diff.value = monster.level\n", "\n", "\"\"\"\n", "df = query(q)\n", "df = df.melt(\n", " id_vars=[\"level\", \"level_diff\"], var_name=\"tier\", value_name=\"min_success_roll\"\n", ")\n", "fig = px.line(\n", " df,\n", " x=\"level\",\n", " y=\"min_success_roll\",\n", " color=\"level_diff\",\n", " labels={\n", " \"level\": \"Player Level\",\n", " \"min_success_roll\": \"d20 success minimum\",\n", " \"level_diff\": \"Player - monster level\",\n", " },\n", " facet_col=\"tier\",\n", " facet_col_wrap=2,\n", " markers=True,\n", ")\n", "fig.show()" ] }, { "cell_type": "code", "execution_count": 101, "id": "5e9c9ad1", "metadata": {}, "outputs": [ { "data": { "application/vnd.plotly.v1+json": { "config": { "plotlyServerURL": "https://plot.ly" }, "data": [ { "hovertemplate": "Weapon die size=d4
Player Level=%{x}
Damage per strike=%{y}", "legendgroup": "d4", "line": { "color": "#636efa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "d4", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AAAAAAAAI0AAAAAAAAAlQAAAAAAAACVAAAAAAAAALEAAAAAAAAAxQAAAAAAAADJAAAAAAAAAMkAAAAAAAAAzQAAAAAAAADNAAAAAAAAANEAAAAAAAAA0QAAAAAAAgDdAAAAAAACAOEAAAAAAAIA5QAAAAAAAgDpAAAAAAACAO0AAAAAAAIA7QAAAAAAAgDxAAAAAAAAAP0AAAAAAAABAQA==", "dtype": "f8" }, "yaxis": "y" }, { "hovertemplate": "Weapon die size=d6
Player Level=%{x}
Damage per strike=%{y}", "legendgroup": "d6", "line": { "color": "#EF553B", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "d6", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AAAAAAAAJUAAAAAAAAAnQAAAAAAAACdAAAAAAAAAMEAAAAAAAAAzQAAAAAAAADRAAAAAAAAANEAAAAAAAAA1QAAAAAAAADVAAAAAAAAANkAAAAAAAAA2QAAAAAAAgDpAAAAAAACAO0AAAAAAAIA8QAAAAAAAgD1AAAAAAACAPkAAAAAAAIA+QAAAAAAAgD9AAAAAAACAQUAAAAAAAABCQA==", "dtype": "f8" }, "yaxis": "y" }, { "hovertemplate": "Weapon die size=d8
Player Level=%{x}
Damage per strike=%{y}", "legendgroup": "d8", "line": { "color": "#00cc96", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "d8", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AAAAAAAAJ0AAAAAAAAApQAAAAAAAAClAAAAAAAAAMkAAAAAAAAA1QAAAAAAAADZAAAAAAAAANkAAAAAAAAA3QAAAAAAAADdAAAAAAAAAOEAAAAAAAAA4QAAAAAAAgD1AAAAAAACAPkAAAAAAAIA/QAAAAAAAQEBAAAAAAADAQEAAAAAAAMBAQAAAAAAAQEFAAAAAAACAQ0AAAAAAAABEQA==", "dtype": "f8" }, "yaxis": "y" }, { "hovertemplate": "Weapon die size=d10
Player Level=%{x}
Damage per strike=%{y}", "legendgroup": "d10", "line": { "color": "#ab63fa", "dash": "solid" }, "marker": { "symbol": "circle" }, "mode": "lines+markers", "name": "d10", "orientation": "v", "showlegend": true, "type": "scatter", "x": { "bdata": "AQIDBAUGBwgJCgsMDQ4PEBESExQ=", "dtype": "i1" }, "xaxis": "x", "y": { "bdata": "AAAAAAAAKUAAAAAAAAArQAAAAAAAACtAAAAAAAAANEAAAAAAAAA3QAAAAAAAADhAAAAAAAAAOEAAAAAAAAA5QAAAAAAAADlAAAAAAAAAOkAAAAAAAAA6QAAAAAAAQEBAAAAAAADAQEAAAAAAAEBBQAAAAAAAwEFAAAAAAABAQkAAAAAAAEBCQAAAAAAAwEJAAAAAAACARUAAAAAAAABGQA==", "dtype": "f8" }, "yaxis": "y" } ], "layout": { "legend": { "title": { "text": "Weapon die size" }, "tracegroupgap": 0 }, "margin": { "t": 60 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 }, "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "histogram": [ { "marker": { "pattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "pie": [ { "automargin": true, "type": "pie" } ], "scatter": [ { "fillpattern": { "fillmode": "overlay", "size": 10, "solidity": 0.2 }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermap": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermap" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "autotypenumbers": "strict", "coloraxis": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "title": { "standoff": 15 }, "zerolinecolor": "white", "zerolinewidth": 2 } } }, "xaxis": { "anchor": "y", "domain": [ 0, 1 ], "title": { "text": "Player Level" } }, "yaxis": { "anchor": "x", "domain": [ 0, 1 ], "title": { "text": "Damage per strike" } } } }, "text/html": [ "
\n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# | label: damage\n", "\n", "q = \"\"\"\n", "select\n", " weapon_die.die as die,\n", " player.level as level,\n", " weapon_die.value * player.weapon_damage_dice\n", " + player.strength\n", " + 2\n", " + player.weapon_specialization\n", " + 2\n", " + floor(player.level / 2) as damage\n", "from player\n", "cross join weapon_die\n", "\"\"\"\n", "df = query(q)\n", "fig = px.line(\n", " df,\n", " x=\"level\",\n", " y=\"damage\",\n", " color=\"die\",\n", " labels={\n", " \"level\": \"Player Level\",\n", " \"damage\": \"Damage per strike\",\n", " \"die\": \"Weapon die size\",\n", " },\n", " markers=True,\n", ")\n", "fig.show()" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.3" } }, "nbformat": 4, "nbformat_minor": 5 }