diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-11-20 15:14:37 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 13:02:37 +0100 |
commit | 62c5a54f132ec16a673fabb3e62a29864b63f54e (patch) | |
tree | 952bdf15b450d73e7f8ff70b2ab1bdd30a855126 | |
parent | 24eaf8561801306327b0e92570e95a2aea67f0c6 (diff) | |
download | nevsky-62c5a54f132ec16a673fabb3e62a29864b63f54e.tar.gz |
Drop back side of service markers.
-rw-r--r-- | data.js | 8 | ||||
-rw-r--r-- | images/service_lords_russian.png | bin | 84195 -> 39800 bytes | |||
-rw-r--r-- | images/service_lords_teutonic.png | bin | 73735 -> 28784 bytes | |||
-rw-r--r-- | images/service_vassals_russian.png | bin | 253454 -> 102990 bytes | |||
-rw-r--r-- | images/service_vassals_teutonic.png | bin | 218894 -> 71570 bytes | |||
-rw-r--r-- | play.html | 59 | ||||
-rw-r--r-- | rules.js | 2 | ||||
-rw-r--r-- | tools/build_counters3.sh | 8 | ||||
-rw-r--r-- | tools/gendata.js | 36 |
9 files changed, 49 insertions, 64 deletions
@@ -162,17 +162,17 @@ vassals:[ {"lord":4,"name":"Summer Crusaders","service":2,"forces":{"knights":2},"capability":"Crusade","image":13}, {"lord":5,"name":"Mstislavich Partisans","service":1,"forces":{"militia":2},"image":14}, {"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":0}, -{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":1}, +{"lord":6,"name":"Mongols","service":3,"forces":{"asiatic_horse":2},"capability":"Steppe Warriors","image":0}, {"lord":6,"name":"Pereyaslavl","service":4,"forces":{"men_at_arms":1},"image":1}, {"lord":6,"name":"Rostov","service":3,"forces":{"men_at_arms":1},"image":2}, {"lord":6,"name":"Yaroslavl","service":3,"forces":{"men_at_arms":1},"image":3}, {"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":4}, -{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":5}, +{"lord":7,"name":"Kipchaqs","service":3,"forces":{"asiatic_horse":3},"capability":"Steppe Warriors","image":4}, {"lord":7,"name":"Suzdal","service":4,"forces":{"men_at_arms":1},"image":5}, {"lord":7,"name":"Vladimir","service":4,"forces":{"men_at_arms":1},"image":6}, {"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7}, -{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":8}, -{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":8}, +{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7}, +{"lord":8,"name":"Novgorod","service":2,"forces":{"militia":2},"image":7}, {"lord":9,"name":"Borderland Russians","service":1,"forces":{"light_horse":1,"militia":1},"image":8}, {"lord":9,"name":"Pskov Militia","service":2,"forces":{"militia":2},"image":9}, {"lord":9,"name":"Pskov","service":4,"forces":{"men_at_arms":1},"image":10}, diff --git a/images/service_lords_russian.png b/images/service_lords_russian.png Binary files differindex 8a76096..b674a4d 100644 --- a/images/service_lords_russian.png +++ b/images/service_lords_russian.png diff --git a/images/service_lords_teutonic.png b/images/service_lords_teutonic.png Binary files differindex 83afacd..9eac2c7 100644 --- a/images/service_lords_teutonic.png +++ b/images/service_lords_teutonic.png diff --git a/images/service_vassals_russian.png b/images/service_vassals_russian.png Binary files differindex 83d9b51..4915082 100644 --- a/images/service_vassals_russian.png +++ b/images/service_vassals_russian.png diff --git a/images/service_vassals_teutonic.png b/images/service_vassals_teutonic.png Binary files differindex a16a6b6..e3be6e3 100644 --- a/images/service_vassals_teutonic.png +++ b/images/service_vassals_teutonic.png @@ -798,47 +798,36 @@ X.mat .mustered_vassals { top: 228px; right: 6px; width: 94px; } box-shadow: 0 0 0 3px yellow; } -.service_marker.lord { background-size: 180px 252px } -.service_marker.vassal { background-size: 180px 630px } +.service_marker.lord { background-size: 90px 252px } +.service_marker.vassal { background-size: 270px 210px } .service_marker.lord.teutonic { background-image:url(images/service_lords_teutonic.png) } .service_marker.lord.russian { background-image:url(images/service_lords_russian.png) } .service_marker.vassal.teutonic { background-image:url(images/service_vassals_teutonic.png) } .service_marker.vassal.russian { background-image:url(images/service_vassals_russian.png) } -.service_marker.image0{background-position:0 -0px} -.service_marker.image1{background-position:0 -42px} -.service_marker.image2{background-position:0 -84px} -.service_marker.image3{background-position:0 -126px} -.service_marker.image4{background-position:0 -168px} -.service_marker.image5{background-position:0 -210px} -.service_marker.image6{background-position:0 -252px} -.service_marker.image7{background-position:0 -294px} -.service_marker.image8{background-position:0 -336px} -.service_marker.image9{background-position:0 -378px} -.service_marker.image10{background-position:0 -420px} -.service_marker.image11{background-position:0 -462px} -.service_marker.image12{background-position:0 -504px} -.service_marker.image13{background-position:0 -546px} -.service_marker.image14{background-position:0 -588px} - -/* -.service_marker.image0:hover{background-position:100% -0px} -.service_marker.image1:hover{background-position:100% -42px} -.service_marker.image2:hover{background-position:100% -84px} -.service_marker.image3:hover{background-position:100% -126px} -.service_marker.image4:hover{background-position:100% -168px} -.service_marker.image5:hover{background-position:100% -210px} -.service_marker.image6:hover{background-position:100% -252px} -.service_marker.image7:hover{background-position:100% -294px} -.service_marker.image8:hover{background-position:100% -336px} -.service_marker.image9:hover{background-position:100% -378px} -.service_marker.image10:hover{background-position:100% -420px} -.service_marker.image11:hover{background-position:100% -462px} -.service_marker.image12:hover{background-position:100% -504px} -.service_marker.image13:hover{background-position:100% -546px} -.service_marker.image14:hover{background-position:100% -588px} -*/ +.service_marker.lord.image0{background-position:0 -0px} +.service_marker.lord.image1{background-position:0 -42px} +.service_marker.lord.image2{background-position:0 -84px} +.service_marker.lord.image3{background-position:0 -126px} +.service_marker.lord.image4{background-position:0 -168px} +.service_marker.lord.image5{background-position:0 -210px} + +.service_marker.vassal.image0{background-position:0 -0px} +.service_marker.vassal.image1{background-position:-90px -0px} +.service_marker.vassal.image2{background-position:-180px -0px} +.service_marker.vassal.image3{background-position:0 -42px} +.service_marker.vassal.image4{background-position:-90px -42px} +.service_marker.vassal.image5{background-position:-180px -42px} +.service_marker.vassal.image6{background-position:0 -84px} +.service_marker.vassal.image7{background-position:-90px -84px} +.service_marker.vassal.image8{background-position:-180px -84px} +.service_marker.vassal.image9{background-position:0 -126px} +.service_marker.vassal.image10{background-position:-90px -126px} +.service_marker.vassal.image11{background-position:-180px -126px} +.service_marker.vassal.image12{background-position:0 -168px} +.service_marker.vassal.image13{background-position:-90px -168px} +.service_marker.vassal.image14{background-position:-180px -168px} /* BACKGROUND COLORS AND BORDERS */ /* :r !node tools/colors.mjs */ @@ -540,8 +540,6 @@ function muster_lord(lord, locale, service) { function muster_vassal(lord, vassal) { let info = data.vassals[vassal] - logi(`${vassal_name[vassal]}`) - game.vassals[vassal] = 1 add_lord_forces(lord, KNIGHTS, info.forces.knights | 0) diff --git a/tools/build_counters3.sh b/tools/build_counters3.sh index 142d802..a4681f2 100644 --- a/tools/build_counters3.sh +++ b/tools/build_counters3.sh @@ -1,5 +1,5 @@ mkdir -p service300 -montage -mode concatenate -tile 2x counters300/lord_teutonic_andreas.a.png counters300/lord_teutonic_andreas.b.png counters300/lord_teutonic_heinrich.a.png counters300/lord_teutonic_heinrich.b.png counters300/lord_teutonic_hermann.a.png counters300/lord_teutonic_hermann.b.png counters300/lord_teutonic_knud_and_abel.a.png counters300/lord_teutonic_knud_and_abel.b.png counters300/lord_teutonic_rudolf.a.png counters300/lord_teutonic_rudolf.b.png counters300/lord_teutonic_yaroslav.a.png counters300/lord_teutonic_yaroslav.b.png service300/service_lords_teutonic.png -montage -mode concatenate -tile 2x counters300/vassal_teutonic_andreas_lettgallian_auxiliaries.a.png counters300/vassal_teutonic_andreas_lettgallian_auxiliaries.b.png counters300/vassal_teutonic_andreas_summer_crusaders.a.png counters300/vassal_teutonic_andreas_summer_crusaders.b.png counters300/vassal_teutonic_andreas_teutonic_vassals.a.png counters300/vassal_teutonic_andreas_teutonic_vassals.b.png counters300/vassal_teutonic_heinrich_heinrich_von_lode.a.png counters300/vassal_teutonic_heinrich_heinrich_von_lode.b.png counters300/vassal_teutonic_heinrich_odward_von_lode.a.png counters300/vassal_teutonic_heinrich_odward_von_lode.b.png counters300/vassal_teutonic_hermann_helmond_von_luneburg.a.png counters300/vassal_teutonic_hermann_helmond_von_luneburg.b.png counters300/vassal_teutonic_hermann_johannes_von_dolen.a.png counters300/vassal_teutonic_hermann_johannes_von_dolen.b.png counters300/vassal_teutonic_hermann_ugaunian_auxiliaries.a.png counters300/vassal_teutonic_hermann_ugaunian_auxiliaries.b.png counters300/vassal_teutonic_knud_and_abel_dietrich_von_kivel.a.png counters300/vassal_teutonic_knud_and_abel_dietrich_von_kivel.b.png counters300/vassal_teutonic_knud_and_abel_estonian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_estonian_auxiliaries.b.png counters300/vassal_teutonic_knud_and_abel_otto_von_luneburg.a.png counters300/vassal_teutonic_knud_and_abel_otto_von_luneburg.b.png counters300/vassal_teutonic_rudolf_ex_sword_brethren.a.png counters300/vassal_teutonic_rudolf_ex_sword_brethren.b.png counters300/vassal_teutonic_rudolf_jerwen_teutonic_vassals.a.png counters300/vassal_teutonic_rudolf_jerwen_teutonic_vassals.b.png counters300/vassal_teutonic_rudolf_summer_crusaders.a.png counters300/vassal_teutonic_rudolf_summer_crusaders.b.png counters300/vassal_teutonic_yaroslav_mstislavich_partisans.a.png counters300/vassal_teutonic_yaroslav_mstislavich_partisans.b.png service300/service_vassals_teutonic.png -montage -mode concatenate -tile 2x counters300/lord_russian_aleksandr.a.png counters300/lord_russian_aleksandr.b.png counters300/lord_russian_andrey.a.png counters300/lord_russian_andrey.b.png counters300/lord_russian_domash.a.png counters300/lord_russian_domash.b.png counters300/lord_russian_gavrilo.a.png counters300/lord_russian_gavrilo.b.png counters300/lord_russian_karelians.a.png counters300/lord_russian_karelians.b.png counters300/lord_russian_vladislav.a.png counters300/lord_russian_vladislav.b.png service300/service_lords_russian.png -montage -mode concatenate -tile 2x counters300/vassal_russian_aleksandr_mongols.a.png counters300/vassal_russian_aleksandr_mongols.b.png counters300/vassal_russian_aleksandr_pereyaslavl.a.png counters300/vassal_russian_aleksandr_pereyaslavl.b.png counters300/vassal_russian_aleksandr_rostov.a.png counters300/vassal_russian_aleksandr_rostov.b.png counters300/vassal_russian_aleksandr_yaroslavl.a.png counters300/vassal_russian_aleksandr_yaroslavl.b.png counters300/vassal_russian_andrey_kipchaqs.a.png counters300/vassal_russian_andrey_kipchaqs.b.png counters300/vassal_russian_andrey_suzdal.a.png counters300/vassal_russian_andrey_suzdal.b.png counters300/vassal_russian_andrey_vladimir.a.png counters300/vassal_russian_andrey_vladimir.b.png counters300/vassal_russian_domash_novgorod.a.png counters300/vassal_russian_domash_novgorod.b.png counters300/vassal_russian_gavrilo_borderland_russians.a.png counters300/vassal_russian_gavrilo_borderland_russians.b.png counters300/vassal_russian_gavrilo_pskov_militia.a.png counters300/vassal_russian_gavrilo_pskov_militia.b.png counters300/vassal_russian_gavrilo_pskov.a.png counters300/vassal_russian_gavrilo_pskov.b.png counters300/vassal_russian_vladislav_izhoran_auxiliaries.a.png counters300/vassal_russian_vladislav_izhoran_auxiliaries.b.png counters300/vassal_russian_vladislav_ingrian_auxiliaries.a.png counters300/vassal_russian_vladislav_ingrian_auxiliaries.b.png counters300/vassal_russian_vladislav_vepsian_auxiliaries.a.png counters300/vassal_russian_vladislav_vepsian_auxiliaries.b.png counters300/vassal_russian_vladislav_vodian_auxiliaries.a.png counters300/vassal_russian_vladislav_vodian_auxiliaries.b.png service300/service_vassals_russian.png +montage -mode concatenate -tile 1x counters300/lord_teutonic_andreas.a.png counters300/lord_teutonic_heinrich.a.png counters300/lord_teutonic_hermann.a.png counters300/lord_teutonic_knud_and_abel.a.png counters300/lord_teutonic_rudolf.a.png counters300/lord_teutonic_yaroslav.a.png service300/service_lords_teutonic.png +montage -mode concatenate -tile 1x counters300/lord_russian_aleksandr.a.png counters300/lord_russian_andrey.a.png counters300/lord_russian_domash.a.png counters300/lord_russian_gavrilo.a.png counters300/lord_russian_karelians.a.png counters300/lord_russian_vladislav.a.png service300/service_lords_russian.png +montage -mode concatenate -tile 3x counters300/vassal_teutonic_andreas_lettgallian_auxiliaries.a.png counters300/vassal_teutonic_andreas_summer_crusaders.a.png counters300/vassal_teutonic_andreas_teutonic_vassals.a.png counters300/vassal_teutonic_heinrich_heinrich_von_lode.a.png counters300/vassal_teutonic_heinrich_odward_von_lode.a.png counters300/vassal_teutonic_hermann_helmond_von_luneburg.a.png counters300/vassal_teutonic_hermann_johannes_von_dolen.a.png counters300/vassal_teutonic_hermann_ugaunian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_dietrich_von_kivel.a.png counters300/vassal_teutonic_knud_and_abel_estonian_auxiliaries.a.png counters300/vassal_teutonic_knud_and_abel_otto_von_luneburg.a.png counters300/vassal_teutonic_rudolf_ex_sword_brethren.a.png counters300/vassal_teutonic_rudolf_jerwen_teutonic_vassals.a.png counters300/vassal_teutonic_rudolf_summer_crusaders.a.png counters300/vassal_teutonic_yaroslav_mstislavich_partisans.a.png service300/service_vassals_teutonic.png +montage -mode concatenate -tile 3x counters300/vassal_russian_aleksandr_mongols.a.png counters300/vassal_russian_aleksandr_pereyaslavl.a.png counters300/vassal_russian_aleksandr_rostov.a.png counters300/vassal_russian_aleksandr_yaroslavl.a.png counters300/vassal_russian_andrey_kipchaqs.a.png counters300/vassal_russian_andrey_suzdal.a.png counters300/vassal_russian_andrey_vladimir.a.png counters300/vassal_russian_domash_novgorod.a.png counters300/vassal_russian_gavrilo_borderland_russians.a.png counters300/vassal_russian_gavrilo_pskov_militia.a.png counters300/vassal_russian_gavrilo_pskov.a.png counters300/vassal_russian_vladislav_izhoran_auxiliaries.a.png counters300/vassal_russian_vladislav_ingrian_auxiliaries.a.png counters300/vassal_russian_vladislav_vepsian_auxiliaries.a.png counters300/vassal_russian_vladislav_vodian_auxiliaries.a.png service300/service_vassals_russian.png diff --git a/tools/gendata.js b/tools/gendata.js index 43ee50d..ef29c5d 100644 --- a/tools/gendata.js +++ b/tools/gendata.js @@ -769,51 +769,49 @@ function to_path(name) { let lord_service = {Russian:[],Teutonic:[]} let vassal_service = {Russian:[],Teutonic:[]} -let last_path, last_side, last_ix +let last_path, last_side -last_path = null +last_path = [] last_side = null lords.forEach((lord,id) => { let side = lord.side let path = "counters300/lord_" + side.toLowerCase() + "_" + to_path(lord.name) if (side !== last_side) { - last_ix = 0 last_side = side + last_path = [] } - lord.image = last_ix - if (path !== last_path) { - last_ix++ - last_path = path + if (!last_path.includes(path)) { + last_path.push(path) lord_service[side].push(path + ".a.png") - lord_service[side].push(path + ".b.png") + // lord_service[side].push(path + ".b.png") } + lord.image = last_path.indexOf(path) }) -last_path = null +last_path = [] last_side = null vassals.forEach((vassal,id) => { let lord = lords[vassal.lord] let side = lord.side let path = "counters300/vassal_" + side.toLowerCase() + "_" + to_path(lord.name) + "_" + to_path(vassal.name) if (side !== last_side) { - last_ix = 0 last_side = side + last_path = [] } - vassal.image = last_ix - if (path !== last_path) { - last_ix++ - last_path = path + if (!last_path.includes(path)) { + last_path.push(path) vassal_service[side].push(path + ".a.png") - vassal_service[side].push(path + ".b.png") + // vassal_service[side].push(path + ".b.png") } + vassal.image = last_path.indexOf(path) }) let script = [] script.push("mkdir -p service300") -script.push("montage -mode concatenate -tile 2x " + lord_service.Teutonic.join(" ") + " service300/service_lords_teutonic.png") -script.push("montage -mode concatenate -tile 2x " + vassal_service.Teutonic.join(" ") + " service300/service_vassals_teutonic.png") -script.push("montage -mode concatenate -tile 2x " + lord_service.Russian.join(" ") + " service300/service_lords_russian.png") -script.push("montage -mode concatenate -tile 2x " + vassal_service.Russian.join(" ") + " service300/service_vassals_russian.png") +script.push("montage -mode concatenate -tile 1x " + lord_service.Teutonic.join(" ") + " service300/service_lords_teutonic.png") +script.push("montage -mode concatenate -tile 1x " + lord_service.Russian.join(" ") + " service300/service_lords_russian.png") +script.push("montage -mode concatenate -tile 3x " + vassal_service.Teutonic.join(" ") + " service300/service_vassals_teutonic.png") +script.push("montage -mode concatenate -tile 3x " + vassal_service.Russian.join(" ") + " service300/service_vassals_russian.png") print("const data = {") print("seaports:" + JSON.stringify(seaports) + ",") |