r/bf4emblems • u/A9821 Amit9821 • Oct 07 '13
Resource Exporting / Importing Emblems: The most effective way to share your emblems.
The copy feature on Battlelog is fairly basic and not ideal for sharing single emblems. By going to a certain URL, you can actually see someone's emblem library and copy emblems from there, but that is not at all convenient. Especially if people want to keep some of their emblems from being shared. So, what I'll be laying out below is a restatement of the Javascript code to export your Emblems individually from Battlelog and then present it to to people on this subreddit when you want to share your emblems.
Credit: Thanks to /u/Graboskyc for the code we'll be using.
Requirements:
- A web browser that allows you to open a console window and execute Javascript commands. Chrome (Ctrl+Shift+J) ~~and Firefox (Ctrl+Shift+K) have access this capability. Most versions of Internet Explorer should work as well.
- A text editor (e.g. Notepad)
- A Battlelog account with BF4 Beta activated on it.
- Emblems to import (from raw data) or export (from base image).
Export Emblems:
- Navigate to the Emblem editor and select the emblem you wish to export.
- Use the appropriate keyboard shortcut to bring up the console screen for your web browser.
Paste the following code into the console and hit 'Enter':
$('body').html('<pre style="color:#000;">emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');</pre>');
- You should now be brought to a new page that shows you all the code you want. Copy and paste this into your text editor.
That's it for exporting!
Import Emblems:
- Navigate to the emblem editor and select the '+' symbol to create a new emblem space.
- Use the appropriate keyboard shortcut to bring up the console screen for your web browser.
- Copy all the code for the emblem you want to import and paste it onto the console and hit 'Enter'.
- Click 'Save and Use' to save the emblem to your library.
That's it for importing!
Share Emblems:
There are two is one method for this, currently.
- You can use Pastebin.com or Google Docs to place your code. This is best if you want to share your code online on this subreddit and other places that don't have spoiler tags to contain the long lines of code. Put a link to it in your thread to make it easy for others to import it to their library. A Google Document will also allow you to create a customized library of emblems you want to share.
Failing the above, you can just set the emblem you want to share on your Battlelog profile for a period of time and tell everyone that it's up for copying.
Method 2 is really a backup in the situation where method 1 doesn't work for you no longer an option in the current version of Battlelog unless you're friends with the person.
Additional Notes:
Exporting and editing the data of your emblem may be the key to perfecting your design. Each layer is available to edit in the code for angle, height, width, etc. This is very useful for when you want to make precise adjustments. It's quite satisfying to have it come out exactly the way you want it.
13
u/graboskyc Oct 07 '13 edited Oct 07 '13
I'm surprised no other web developers here have cleaned this up.
EDIT: made this simpler:
paste in this code:
$('body').html('<pre style="color:#000;">emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');</pre>');
I tested this in IE 10, FF, Chrome. My previous (pre-EDIT) involved using console.log(JSON.stringify(emblem.emblem.data)); and manual copy/paste/prepending/appending but this is cleaner for normal people.
2
u/A9821 Amit9821 Oct 07 '13 edited Oct 07 '13
Alright, looks like the export code does not work on Firefox. Import does work, though. Spread the word.
2
u/khromosone Nov 03 '13
Can't get anything in this thread to work with latest Google Chrome.
19
u/slvl Oct 12 '13
Better Battlelog plugin: here
4
u/zogga007 Mar 15 '14
I just triedf to export an emblem and in Chrome it says:
in FF i get:
anyone knows whats up there?
1
u/Jais9 Oct 07 '13
For some reason my emblem data begins not with "emblem.emblem.load" but instead with "Emblem data to load". Copying my emblem data doesn't work, and neither does manually changing the first line to emblem.emblem.load. I am apparently not the only one with this problem, but I simply cannot figure out why my console shows something different from most of you.
1
u/[deleted] Oct 07 '13
Please sticky this.
1
u/AboveTheSource Oct 07 '13
Is it possible to export ANY image to this format? TIA.
1
u/[deleted] Oct 07 '13
Why is this thread not a sticky?
1
u/vb5piz3r_onion Nov 02 '13
Anyone else getting the "TOO_MANY_CONCURRENT_CONNECTIONS" error?
1
u/titeuf02 Nov 22 '13
http://redd.it/1nw3jy
1
u/NarcolepticLion Jan 30 '14
Total fuckin newb here, how do I "copy an emblem's code"? I want this Deathstroke emblem but can't for the goddamn life of me figure out how to get at it's code.
1
u/Red237 Mar 03 '14 edited Jun 13 '24
nine paint juggle retire panicky squeal steer fall smile ancient
This post was mass deleted and anonymized with Redact
3
u/SuperfluousShark Xhro 13 Nov 20 '13
Chrome Command Console on Mac is Command, Option, J.
2
u/1stMora Oct 07 '13
Before anyone tries, its not possible to merge emblems. You cannot save more then 20 layers regardless of how many you actually import. Would have been a great hack though.
1
u/PayJi Oct 07 '13
Emblems Gallery at the bottom of the page http://bf.game-guide.fr/importexport-des-emblemes/ There is a link to the code to paste under each picture
1
u/[deleted] Oct 07 '13
all i seem to be getting is emblem.emblem.load({ "objects": [] }); don't think that seems to be right?
1
u/Apsalus Oct 14 '13
Thanks. I was hoping that it could be this easy.
1
u/fratzi Nov 02 '13
An alternative method for this:
http://www.reddit.com/r/bf4emblems/comments/1pqb2p/how_to_share_and_copy_emblems/
1
u/[deleted] Nov 09 '13 edited Nov 09 '13
anyone why when i import some it saves IMAGE_NOT_SAVED then in the console says unprocessable entity?
1
u/pacoBgood Feb 19 '14 edited Feb 19 '14
what line of code do I have to copy? I am using Chrome and nothing written here corresponds with what I am seeing on either BF4 page or the page where the emblem is I wish to copy. I added in $('body').html('<pre style="color:#000;">emblem.emblem.load('+JSON.stringify(emblem.emblem.data,null,2)+');</pre>'); to the concole and now I have a blank page
0
u/Smanimal Nov 07 '13 edited Nov 07 '13
Is it possible to stack emblems. Say you have one for your clan and you have one that you want to use for yourself as well. I can't seem to get it to work but I may be coding incorrectly. Has anyone gotten it to work?
EDIT: YES YOU CAN. I figured it out. Was missing a comma and had the {} [] mixed up.