From a8e9228b5a807269cf727f79020fce95589ad6c6 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Tue, 30 Apr 2024 21:52:42 +0200 Subject: layout cylinders in columns TODO: better seat marker positions --- tools/gendata.js | 98 +++++++++++++++++++++++++------------------------- tools/layout.svg | 106 +++++++++++++++++++++++++++---------------------------- 2 files changed, 102 insertions(+), 102 deletions(-) (limited to 'tools') diff --git a/tools/gendata.js b/tools/gendata.js index 0b676ec..ade9bbf 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -42,7 +42,7 @@ const boxes = { "Harlech": [282,919,57,52], "London": [878,1159,89,73], "Calais": [1137,1411,63,58], - "Scotland": [448,277,113,132], + "Scotland": [449,277,113,132], "France": [888,1428,113,132], "Ireland": [48,950,113,132], "Burgundy": [993,684,113,132], @@ -113,34 +113,34 @@ const boxes = { "vassal vassal_devon": [406,1400,27,30], "vassal vassal_bonville": [174,1377,27,30], "vassal vassal_beaumont": [753,787,27,30], - "seat lancaster lord_henry_vi": [840,1168,50,50], - "seat lancaster lord_margaret": [847,1153,50,50], - "seat lancaster lord_henry_tudor": [831,1186,50,50], - "seat lancaster lord_clarence": [656,613,50,50], - "seat lancaster lord_northumberland_l": [392,422,50,50], + "seat lancaster lord_henry_vi": [865,1166,50,50], + "seat lancaster lord_margaret": [864,1166,50,50], + "seat lancaster lord_henry_tudor": [864,1166,50,50], + "seat lancaster lord_clarence": [650,637,50,50], + "seat lancaster lord_northumberland_l": [392,430,50,50], "seat lancaster lord_buckingham": [714,975,50,50], - "seat lancaster lord_jasper_tudor_2": [340,926,50,50], - "seat lancaster lord_jasper_tudor_1": [192,1077,50,50], - "seat lancaster lord_oxford": [692,1085,50,50], + "seat lancaster lord_jasper_tudor_2": [346,921,50,50], + "seat lancaster lord_jasper_tudor_1": [190,1066,50,50], + "seat lancaster lord_oxford": [678,1078,50,50], "seat lancaster lord_warwick_l": [1150,1350,50,50], - "seat lancaster lord_exeter_1": [345,1329,50,50], - "seat lancaster lord_somerset_1": [457,1275,50,50], - "seat york lord_edward_iv": [899,1149,50,50], - "seat york lord_gloucester_2": [933,1158,50,50], - "seat york lord_gloucester_1": [604,1074,50,50], - "seat york lord_salisbury": [653,643,50,50], - "seat york lord_march": [435,955,50,50], - "seat york lord_rutland": [1096,1189,50,50], - "seat york lord_devon": [315,1353,50,50], - "seat york lord_pembroke": [139,1106,50,50], + "seat lancaster lord_exeter_1": [300,1333,50,50], + "seat lancaster lord_somerset_1": [453,1277,50,50], + "seat york lord_edward_iv": [929,1164,50,50], + "seat york lord_gloucester_2": [930,1165,50,50], + "seat york lord_gloucester_1": [609,1074,50,50], + "seat york lord_salisbury": [770,636,50,50], + "seat york lord_march": [427,969,50,50], + "seat york lord_rutland": [1125,1214,50,50], + "seat york lord_devon": [359,1318,50,50], + "seat york lord_pembroke": [132,1095,50,50], "seat york lord_norfolk": [795,1398,50,50], - "seat york lord_northumberland_y1": [391,423,50,50], + "seat york lord_northumberland_y1": [391,431,50,50], "seat york lord_warwick_y": [1150,1349,50,50], - "seat york lord_york": [908,937,50,50], - "seat york lord_northumberland_y2": [391,423,50,50], - "seat york lord_richard_iii": [933,1158,50,50], - "seat lancaster lord_somerset_2": [457,1275,50,50], - "seat lancaster lord_exeter_2": [345,1329,50,50], + "seat york lord_york": [906,937,50,50], + "seat york lord_northumberland_y2": [391,431,50,50], + "seat york lord_richard_iii": [930,1165,50,50], + "seat lancaster lord_somerset_2": [452,1276,50,50], + "seat lancaster lord_exeter_2": [300,1333,50,50], } let data = [] @@ -154,7 +154,6 @@ var locmap = {} var locales = [] var ways = [] var seat = [] -var vassalbox = [] const scale = 1 var is = { stronghold: [] } @@ -189,13 +188,6 @@ function defseat(name) { } function defvassal(name) { - let [x, y, w, h] = boxes[name] - x = Math.floor(x) - y = Math.floor(y) - w = Math.ceil(w) - h = Math.ceil(h) - locmap[name] = locales.length - vassalbox.push({ name, box: { x, y, w, h } }) } @@ -339,22 +331,21 @@ defseat("seat lancaster lord_henry_tudor") defseat("seat lancaster lord_oxford") defseat("seat lancaster lord_warwick_l") - // VASSAL SEAT -defvassal("vassal vassal_westmoreland") -defvassal("vassal vassal_stanley") -defvassal("vassal vassal_dudley") -defvassal("vassal vassal_shrewsbury") -defvassal("vassal vassal_worcester") -defvassal("vassal vassal_oxford") -defvassal("vassal vassal_essex") -defvassal("vassal vassal_suffolk") -defvassal("vassal vassal_fauconberg") -defvassal("vassal vassal_norfolk") -defvassal("vassal vassal_devon") -defvassal("vassal vassal_bonville") -defvassal("vassal vassal_beaumont") +defvassal("Westmoreland") +defvassal("Stanley") +defvassal("Dudley") +defvassal("Shrewsbury") +defvassal("Worcester") +defvassal("Oxford") +defvassal("Essex") +defvassal("Suffolk") +defvassal("Fauconberg") +defvassal("Norfolk") +defvassal("Devon") +defvassal("Bonville") +defvassal("Beaumont") //WAYS BETWEEN LOCALES @@ -1402,7 +1393,17 @@ arts_of_war_roses(3, "L", 32, 37) let vassals = [] function vassal(service, name, seat, influence, capability) { - vassals.push({service, name, seat, influence, capability }) + let boxname = "vassal vassal_" + name.toLowerCase() + let box = null + if (boxname in boxes) { + let [x, y, w, h] = boxes[boxname] + x = Math.floor(x) + y = Math.floor(y) + w = Math.ceil(w) + h = Math.ceil(h) + box = { x, y, w, h } + } + vassals.push({service, name, seat, influence, capability, box }) } lords.forEach(lord => { @@ -1469,7 +1470,6 @@ dumplist("cards", cards) // layout client only dumplist("seat", seat) -dumplist("vassalbox", vassalbox) print("}") diff --git a/tools/layout.svg b/tools/layout.svg index bb1da3a..8e9ca6b 100644 --- a/tools/layout.svg +++ b/tools/layout.svg @@ -38,9 +38,9 @@ inkscape:pagecheckerboard="0" inkscape:deskcolor="#d1d1d1" showgrid="false" - inkscape:zoom="0.73946615" - inkscape:cx="765.1019" - inkscape:cy="825.23435" + inkscape:zoom="2.2194061" + inkscape:cx="833.37458" + inkscape:cy="1115.5331" inkscape:window-width="1920" inkscape:window-height="991" inkscape:window-x="-9" @@ -104,7 +104,7 @@ id="rect785" width="113" height="132" - x="448.42093" + x="448.64621" y="277.33926" inkscape:label="Scotland" /> @@ -709,8 +709,8 @@ id="rect1044" width="50" height="50" - x="846.57922" - y="1153.4371" + x="863.80273" + y="1165.8037" rx="0" ry="0" inkscape:label="seat lancaster lord_margaret" /> @@ -719,8 +719,8 @@ id="rect1046" width="50" height="50" - x="830.82922" - y="1186.1871" + x="864.17682" + y="1165.7495" rx="0" ry="0" inkscape:label="seat lancaster lord_henry_tudor" /> @@ -729,8 +729,8 @@ id="rect1056" width="50" height="50" - x="655.61737" - y="612.94305" + x="649.81378" + y="636.87598" rx="0" ry="0" inkscape:label="seat lancaster lord_clarence" /> @@ -739,8 +739,8 @@ id="rect1058" width="50" height="50" - x="392.328" - y="422.1658" + x="391.6908" + y="430.44946" rx="0" ry="0" inkscape:label="seat lancaster lord_northumberland_l" /> @@ -759,8 +759,8 @@ id="rect1066" width="50" height="50" - x="339.72382" - y="925.52167" + x="346.1814" + y="920.9292" rx="0" ry="0" inkscape:label="seat lancaster lord_jasper_tudor_2" /> @@ -769,8 +769,8 @@ id="rect1068" width="50" height="50" - x="192.24489" - y="1076.7739" + x="190.02089" + y="1066.2098" rx="0" ry="0" inkscape:label="seat lancaster lord_jasper_tudor_1" /> @@ -779,8 +779,8 @@ id="rect1070" width="50" height="50" - x="691.93689" - y="1085.2159" + x="677.88678" + y="1078.3939" rx="0" ry="0" inkscape:label="seat lancaster lord_oxford" /> @@ -799,8 +799,8 @@ id="rect1076" width="50" height="50" - x="344.55917" - y="1329.3937" + x="300.21649" + y="1333.0049" rx="0" ry="0" inkscape:label="seat lancaster lord_exeter_1" /> @@ -809,8 +809,8 @@ id="rect1082" width="50" height="50" - x="457.35245" - y="1274.7346" + x="452.98563" + y="1276.9834" rx="0" ry="0" inkscape:label="seat lancaster lord_somerset_1" /> @@ -819,8 +819,8 @@ id="rect1048" width="50" height="50" - x="898.57922" - y="1149.0419" + x="929.32196" + y="1164.1428" rx="0" ry="0" inkscape:label="seat york lord_edward_iv" /> @@ -829,8 +829,8 @@ id="rect1050" width="50" height="50" - x="933.07922" - y="1157.7919" + x="929.90576" + y="1164.5527" rx="0" ry="0" inkscape:label="seat york lord_gloucester_2" /> @@ -839,8 +839,8 @@ id="rect1052" width="50" height="50" - x="603.96716" - y="1074.3378" + x="608.6463" + y="1074.3502" rx="0" ry="0" inkscape:label="seat york lord_gloucester_1" /> @@ -849,8 +849,8 @@ id="rect1054" width="50" height="50" - x="653.27295" - y="642.50726" + x="769.72131" + y="636.0224" rx="0" ry="0" inkscape:label="seat york lord_salisbury" /> @@ -859,8 +859,8 @@ id="rect1064" width="50" height="50" - x="434.75497" - y="954.68988" + x="427.02731" + y="968.99597" rx="0" ry="0" inkscape:label="seat york lord_march" /> @@ -869,8 +869,8 @@ id="rect1072" width="50" height="50" - x="1095.96" - y="1188.509" + x="1124.8721" + y="1214.0852" rx="0" ry="0" inkscape:label="seat york lord_rutland" /> @@ -879,8 +879,8 @@ id="rect1078" width="50" height="50" - x="315.2449" - y="1353.4467" + x="358.9256" + y="1318.0125" rx="0" ry="0" inkscape:label="seat york lord_devon" /> @@ -889,8 +889,8 @@ id="rect1080" width="50" height="50" - x="138.9648" - y="1105.7858" + x="131.73676" + y="1095.2217" rx="0" ry="0" inkscape:label="seat york lord_pembroke" /> @@ -899,8 +899,8 @@ id="rect1084" width="50" height="50" - x="794.68335" - y="1398.1376" + x="795.47052" + y="1398.2999" rx="0" ry="0" inkscape:label="seat york lord_norfolk" /> @@ -909,8 +909,8 @@ id="rect440" width="50" height="50" - x="391.49115" - y="423.03864" + x="390.85394" + y="431.3223" rx="0" ry="0" inkscape:label="seat york lord_northumberland_y1" /> @@ -929,7 +929,7 @@ id="rect446" width="50" height="50" - x="907.82666" + x="905.60266" y="937.26581" rx="0" ry="0" @@ -939,8 +939,8 @@ id="rect106" width="50" height="50" - x="391.49115" - y="423.03864" + x="390.85394" + y="431.3223" rx="0" ry="0" inkscape:label="seat york lord_northumberland_y2" /> @@ -949,8 +949,8 @@ id="rect108" width="50" height="50" - x="933.07922" - y="1157.7919" + x="929.90576" + y="1165.1088" rx="0" ry="0" inkscape:label="seat york lord_richard_iii" /> @@ -959,8 +959,8 @@ id="rect110" width="50" height="50" - x="457.35245" - y="1274.7346" + x="452.42963" + y="1276.4276" rx="0" ry="0" inkscape:label="seat lancaster lord_somerset_2" /> @@ -969,8 +969,8 @@ id="rect112" width="50" height="50" - x="344.55917" - y="1329.3937" + x="299.66049" + y="1333.0049" rx="0" ry="0" inkscape:label="seat lancaster lord_exeter_2" /> -- cgit v1.2.3