SVG Format Issues

4
United States
Florida
EnclaveVixen
EnclaveVixen
So, I finally got it to where the SVG format keeps my font from Illustrator but now compressing is an issue. I used SVGOMG first, and it would upload but not show up in game. Then, I would compress it with Nano and it would finally show up in game but the i's in the decal were missing?? I cannot for the life of me get this decal to upload with the i's still there. I can't figure out what I'm doing wrong, any help is much appreciated! Thank you.
 
Right, two things:

One - fixing the issue

Take that file and run it through https://xerocho.github.io/svgomg/

Make sure Compare GZipped is turned off, and leave the quality slider all the way up...

Should look like this...

1647653157693.png


Now... download the file.

Open it in Notepad, or some other raw text editor...

It will look like this...

1647653333489.png



The two 'tags' I've highlighted in red are causing the problem. if you delete <switch> and </switch> and save the file (you have to save it as .svg... NOT .txt)

Then upload it using the decal uploader, and you should see it works. I took these steps and it seems to work in game.

I've attached the 'cleaned' file in case you're still tearing your hair out with it.


Two - WTF??!?

So the file you uploaded is an absolute mess. That's not your fault, it's how illustrator exports SVG and it's bloody awful. The SVGOMG tool does a good job of cutting out AAAALLLLL the irrelevant stuff, but if it finds something it doesn't understand, it leaves it in. When you open the SVG in your browser (for instance), the browser also just ignores stuff it doesn't understand - that's why it shows in the browser when you upload it. BUT the SVG renderer they use IN the game doesn't ignore them, it just fails when it gets to them. Any XML 'tags' that aren't fairly basic SVG will trip over the game's SVG renderer, browsers are way more 'tolerant'.

There might be export options in illustrator... you need to select whatever options you can to export the most simple SVG it can... for instance in Inkscape they call it "Plain SVG" instead of "Inkscape SVG", or "Optimised SVG"... I don't have illustrator on this PC, so I can't check myself, but there could well be similar options.
 

Attachments

  • MNRT.svg
    9.5 KB · Views: 25
Right, two things:

One - fixing the issue

Take that file and run it through https://xerocho.github.io/svgomg/

Make sure Compare GZipped is turned off, and leave the quality slider all the way up...

Should look like this...

View attachment 1126146

Now... download the file.

Open it in Notepad, or some other raw text editor...

It will look like this...

View attachment 1126153


The two 'tags' I've highlighted in red are causing the problem. if you delete <switch> and </switch> and save the file (you have to save it as .svg... NOT .txt)

Then upload it using the decal uploader, and you should see it works. I took these steps and it seems to work in game.

I've attached the 'cleaned' file in case you're still tearing your hair out with it.


Two - WTF??!?

So the file you uploaded is an absolute mess. That's not your fault, it's how illustrator exports SVG and it's bloody awful. The SVGOMG tool does a good job of cutting out AAAALLLLL the irrelevant stuff, but if it finds something it doesn't understand, it leaves it in. When you open the SVG in your browser (for instance), the browser also just ignores stuff it doesn't understand - that's why it shows in the browser when you upload it. BUT the SVG renderer they use IN the game doesn't ignore them, it just fails when it gets to them. Any XML 'tags' that aren't fairly basic SVG will trip over the game's SVG renderer, browsers are way more 'tolerant'.

There might be export options in illustrator... you need to select whatever options you can to export the most simple SVG it can... for instance in Inkscape they call it "Plain SVG" instead of "Inkscape SVG", or "Optimised SVG"... I don't have illustrator on this PC, so I can't check myself, but there could well be similar options.
Aaaah thank you! Did not know to take the switch parts out. And I did leave the compare GZipped on lol. This made my evening, thank you for your help!
 
Aaaah thank you! Did not know to take the switch parts out. And I did leave the compare GZipped on lol. This made my evening, thank you for your help!

No problem.

The thing is, the switch tags shouldn't be there, that's something Illustrator is doing. I get a similar problem with CorelDraw... depending on the export options, sometimes it uses <!CDATA ... > tags, and that messes things up.
 
Back