2017 05 « 1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30. »  2017 07

スポンサーサイト

 【--//--】

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

Category: スポンサー広告

Comments (-)Trackbacks (-) | トップへ戻る

【Battlefield 1】エンブレムをコピーする際のerrorを無くす方法

 【06//2017】

ぐだすくです.
今回は,Battlefield1のエンブレム作成について書きます.
”BF1 エンブレム”で検索すると,エンブレムを公開してあるサイトから,コードをコピーして,BF1のサイト→キャリア→エンブレム画面でコンソールを開いて貼りつけて実行とあります.
基本的には,グーグル検索上位に出てくるサイトの通りにやればエンブレムをコピーできます.
しかし,エンブレムのコードをコンソールに貼りつけて実行した際,たまに(自分は結構な頻度で)errorメッセージが表示されます.
BF1_エンブレムerror画面

この問題をネットで検索した場合,プレミアムに入っていないから~という理由の解答しかありません.
たしかに,プレミアムに入っていない場合,2つの問題が発生します.
・レイヤーの上限数が20個に限定される(プレミアムパス持ちは40)
・プレミアムパス限定のエンブレムパーツが使えない

これも,大変致命的でコピーできるエンブレムの自由度が大幅に下がります.
今回の記事は,プレミアムパスを所持しているにもかかわらず,errorが発生する原因の究明と解決策について書きます.
ざっくりと書く上に,多少のプログラミングの知識が必要になるかと思います.
本当に少しでいいです.

ただし,
結論を書きます.
このerrorの原因は,恐らくBF4かBF1で限定のエンブレムパーツが使われているために起こります
BF4では,バトルパックからの入手限定のエンブレムパーツなどがあり,それがerrorの原因になっていると思われます.
コンソールに貼りつけるコードを眺めると,それぞれのレイヤーの図形名・位置・大きさなどを指定している欄が大半を占めます.
そこから,解決策を考えました.
その中から,errorを起こすレイヤーを削除してから貼りつければ,errorが起きなくなります

適当にanimeで検索して選んだ画像を例に説明します.
http://emblemsbf.com/emblem-65246.html
↑のURLのエンブレムをコンソールに貼ろうとすると,エラーが出ます.
少し長くなりますが,以下にコードを貼ります.
重要な部分をオレンジ色でハイライトします.


var request=new XMLHttpRequest;request.open("POST","https://companion-api.battlefield.com/jsonrpc/web/api?Emblems.newPrivateEmblem",!0),request.onreadystatechange=function(){if(request.readyState==XMLHttpRequest.DONE){var e=JSON.parse(request.responseText);e.result?window.location.href=window.location.href.replace("/new","/edit/")+e.result.slot:alert("Error")}},request.setRequestHeader("Content-Type","application/json;charset=UTF-8"),request.setRequestHeader("X-GatewaySession",localStorage.gatewaySessionId),data={jsonrpc:"2.0",method:"Emblems.newPrivateEmblem",params:{data:'[{"opacity":1,"angle":27.2872381498,"flipX":false,"flipY":false,"top":202.36770645790003,
"height":175.60659865889997,"width":303.35910534640004,"asset":"Circle","selectable":true,
"left":141.64219656,"fill":"#A95B43"},{"opacity":1,"angle":47.6962935441,"flipX":false,"flipY":false,"top":38.1416142477,
"height":316.2024553795,"width":82.3449511504,"asset":"Circle","selectable":true,
"left":1.7685095977,"fill":"#C7A05D"},{"opacity":1,"angle":34.9579763645,"flipX":false,"flipY":false,"top":378.4810346808,
"height":258.70011005480006,"width":258.70011005480006,"asset":"Square","selectable":true,
"left":33.430627685,"fill":"#EFEFEF"},{"opacity":1,"angle":25.3484303768,"flipX":false,"flipY":false,"top":311.0466827258,
"height":11.9694480239,"width":153.7446640373,"asset":"Emblem120","selectable":true,
"left":4.4732772942,"fill":"#BEBECA"},{"opacity":1,"angle":0,"flipX":false,"flipY":false,"top":196.25,
"height":159.5015576324,"width":159.5015576324,"asset":"Circle","selectable":true,
"left":133.125,"fill":"#F5E2D3"},{"opacity":1,"angle":47.6962935441,"flipX":false,"flipY":false,"top":66.2666142477,
"height":316.2024553795,"width":82.3449511504,"asset":"Circle","selectable":true,
"left":29.268509597700003,"fill":"#F5905A"},{"opacity":1,"angle":307.5696826652,"flipX":false,"flipY":false,"top":46.3401591791,
"height":128.6683946816,"width":378.6574816963,"asset":"RightTriangle","selectable":true,
"left":29.2188615824,"fill":"#F7CAA8"},
{"opacity":1,"angle":217.1482017998,"flipX":false,"flipY":false,"top":214.515540667,
"height":49.6079163796,"width":171.6750979218,"asset":"Heart","selectable":true,
"left":31.5485708664,"fill":"#E98757"},{"opacity":1,"angle":299.2357468544,"flipX":false,"flipY":true,"top":299.1775748339,
"height":161.4144295675,"width":50.4638854948,"asset":"Emblem120","selectable":true,
"left":145.3667231409,"fill":"#F68E55"},{"opacity":1,"angle":273.8890816296,"flipX":false,"flipY":false,"top":135,
"height":337.3954427757,"width":310.1437445885,"asset":"Emblem120","selectable":true,
"left":185.625,"fill":"#674539"},{"opacity":1,"angle":275.9555912822,"flipX":false,"flipY":false,"top":136.8255917667,
"height":330.9275483297,"width":306.3340809882,"asset":"Emblem120","selectable":true,
"left":184.0844527063,"fill":"#F5E2D3"},{"opacity":1,"angle":32.8044497524,"flipX":false,"flipY":false,"top":183.51523457389996,
"height":52.7746891415,"width":133.3849320161,"asset":"Circle","selectable":true,
"left":146.0415347489,"fill":"#945D6C"},{"opacity":1,"angle":33.4142203853,"flipX":false,"flipY":false,"top":186.8185326634,
"height":39.0656648489,"width":128.8520218576,"asset":"Circle","selectable":true,
"left":140.4625851222,"fill":"#C36E75"},{"opacity":1,"angle":34.3579986034,"flipX":false,"flipY":false,"top":191.875,
"height":26.6262666402,"width":121.23781359640002,"asset":"Eye2","selectable":true,
"left":135,"fill":"#F3A4A9"},{"opacity":1,"angle":0,"flipX":false,"flipY":false,"top":220.1878894081,
"height":24.125778816199997,"width":20,"asset":"Circle","selectable":true,
"left":166.875,"fill":"#F3A4A9"},{"opacity":1,"angle":33.3810853872,"flipX":false,"flipY":false,"top":157.2389235326,
"height":48.9875267686,"width":134.7819648563,"asset":"Eye2","selectable":true,
"left":150.896924274,"fill":"#F5E2D3"},{"opacity":1,"angle":313.7802770218,"flipX":false,"flipY":false,"top":162.7001090561,
"height":82.5183147046,"width":18.108920619,"asset":"Emblem71","selectable":true,
"left":261.5579380139,"fill":"#2C1B2A"},
{"opacity":1,"angle":39.1042291262,"flipX":false,"flipY":false,"top":161.9672838496,
"height":26.6257788162,"width":135.3993741576,"asset":"Circle","selectable":true,
"left":236.2133640439,"fill":"#F5E2D3"},{"opacity":1,"angle":296.2956645829,"flipX":false,"flipY":false,"top":76.875,
"height":73.5659114427,"width":47.3295948272,"asset":"Emblem71","selectable":true,
"left":112.5,"fill":"#2C1B2A"},
{"opacity":1,"angle":33.6822480118,"flipX":false,"flipY":false,"top":100,
"height":52.52230007239999,"width":135.3993741576,"asset":"Circle","selectable":true,
"left":119.375,"fill":"#F5E2D3"},{"opacity":1,"angle":67.6168184663,"flipX":false,"flipY":false,"top":199.7535219422,
"height":15.562807048100002,"width":29.129522246099995,"asset":"Eye2","selectable":true,
"left":295.9381926306,"fill":"#F5E2D3"},{"opacity":1,"angle":178.9584072711,"flipX":false,"flipY":false,"top":50.9982159045,
"height":10.4034845861,"width":23.2555464257,"asset":"Eye2","selectable":true,
"left":79.5005694513,"fill":"#F5E2D3"},{"opacity":1,"angle":32.0084741659,"flipX":false,"flipY":false,"top":136.8763000341,
"height":71.491912196,"width":107.60748944949998,"asset":"Banner","selectable":true,
"left":173.1859542077,"fill":"#F5E2D3"},{"opacity":1,"angle":44.6085428086,"flipX":false,"flipY":false,"top":203.47689254160002,
"height":40.5109687132,"width":63.581924647700006,"asset":"Circle","selectable":true,
"left":260.5014206338,"fill":"#F5B1A6"},{"opacity":1,"angle":16.2383975653,"flipX":false,"flipY":false,"top":76.7621250899,
"height":30.763024990300003,"width":48.2825367795,"asset":"Circle","selectable":true,
"left":75.5363862523,"fill":"#F5B1A6"},{"opacity":1,"angle":110.2547469602,"flipX":false,"flipY":true,"top":115.45611491030002,
"height":29.308355711100003,"width":231.6428159131,"asset":"Wingpart","selectable":true,
"left":339.764627992,"fill":"#FCD1AE"},{"opacity":1,"angle":319.4727380482,"flipX":false,"flipY":false,"top":118.1569228785,
"height":2.1754169284,"width":6.0625950152,"asset":"Emblem120","selectable":true,
"left":169.8928124693,"fill":"#5F4E47"},{"opacity":1,"angle":329.2439672041,"flipX":false,"flipY":true,"top":-35.1265349691,
"height":30.1315810973,"width":294.475479012,"asset":"Wingpart","selectable":true,
"left":183.10221015399998,"fill":"#FCD1AE"},{"opacity":1,"angle":316.427378348,"flipX":false,"flipY":false,"top":273.9579633334,
"height":137.4961269609,"width":503.80660944590005,"asset":"Heart","selectable":true,
"left":322.12155426569996,"fill":"#F6CBA8"},{"opacity":1,"angle":324.8057710365,"flipX":false,"flipY":true,"top":-55.1265349691,
"height":30.1315810973,"width":294.475479012,"asset":"Wingpart","selectable":true,
"left":231.22721015400003,"fill":"#FCD1AE"},{"opacity":1,"angle":108.4965078769,"flipX":false,"flipY":false,"top":-8.697468078,
"height":23.309451800000005,"width":231.6428159131,"asset":"Wingpart","selectable":true,
"left":284.7144925184,"fill":"#FCD1AE"},{"opacity":1,"angle":236.8533319564,"flipX":false,"flipY":false,"top":29.7902598438,
"height":139.548072761,"width":66.2312712481,"asset":"Drop","selectable":true,
"left":228.93060120710004,"fill":"#FCD1AE"},
{"opacity":1,"angle":118.7928642094,"flipX":false,"flipY":true,"top":32.9561149103,
"height":29.308355711100003,"width":231.6428159131,"asset":"Wingpart","selectable":true,
"left":328.514627992,"fill":"#FCD1AE"},{"opacity":0.33,"angle":134.7323093353,"flipX":false,"flipY":false,"top":68.9868820888,
"height":147.4620594232,"width":147.4620594232,"asset":"Circle","selectable":true,
"left":97.4602257131,"fill":"#E5DEDB"},{"opacity":0.32,"angle":134.7323093353,"flipX":false,"flipY":false,"top":70,
"height":139.9367431842,"width":139.9367431842,"asset":"Circle","selectable":true,
"left":98.0603647029,"fill":"#E8EAE7"},{"opacity":1,"angle":215.5232657072,"flipX":false,"flipY":true,"top":46.9240415625,
"height":284.53473988710005,"width":585.4446887215001,"asset":"ArrowBent","selectable":true,
"left":274.6436831361,"fill":"#F5905A"},{"opacity":1,"angle":80.4882483546,"flipX":false,"flipY":false,"top":90.9495741739,
"height":293.0524353125,"width":547.6911810855,"asset":"ArrowBent","selectable":true,
"left":329.9245852411,"fill":"#F5905A"},{"opacity":1,"angle":329.4243110184,"flipX":false,"flipY":false,"top":90.625,
"height":38.7781609502,"width":5.8598492328,"asset":"CrescentMoon","selectable":true,
"left":304.375,"fill":"#562D19"},{"opacity":1,"angle":276.2000153039,"flipX":false,"flipY":false,"top":3.75,
"height":35.86937197009999,"width":5.4202960292,"asset":"CrescentMoon","selectable":true,
"left":175,"fill":"#562D19"},
{"opacity":1,"angle":26.9907930985,"flipX":false,"flipY":false,"top":274.5646021967,
"height":17.554292916900003,"width":25.9757671798,"asset":"Circle","selectable":true,
"left":103.0790818348,"fill":"#AD593B"}]'},id:"00000000-0000-0000-0000-000000000000"},
request.send(JSON.stringify(data));
 


オレンジ色でハイライトされた部分が,(自分の環境では)エラーとなるレイヤーです.
エラーとなる部分をどう見分けるかというと,{}内の"asset":の後の図形の名前です.
この図形を所持していないと,エラーが返ってきます.
そのため,オレンジの部分を削除して(カンマの消し忘れ等に注意.最後はカンマが要りません)貼りつけてコンソールから実行すれば,削除したレイヤー以外をコピーできます.
削除してしまったレイヤーは,自分で別の図形を用いて補完する必要があります

私の環境で使えなかった図形を以下に列挙しておきます.
他にも様々な図形が使えないと考えられます.
・CrescentMoon
・emblem71
・RightTriangle
・Drop

面倒くさいですが,エンブレムコピーしたいときは,少し工夫すれば,微改変を行うことでerrorで使用できなかったエンブレムも使用できるようになります.



スポンサーサイト

Category: Battlefield 1

Tags : ぐだすく BF1

Comments (2)Trackbacks (-) | トップへ戻る

上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。