Results 1 to 4 of 4

Thread: Enable Data URIs for Images in Save JSON

  1. #1
    Join Date
    Jun 2015
    Posts
    3

    Enable Data URIs for Images in Save JSON

    I would like to share my board game with a friend without having to host images for the custom decks.

    I've noticed that the save file format already uses Base64 encoded data for some of the fields. Would it be possible to enable storing images in the save files? I've tried tweaking the file manually, but nothing seemed to work.

  2. #2
    Join Date
    Jun 2015
    Posts
    3
    Bump?

  3. #3
    Join Date
    Jun 2015
    Location
    It's really hot here.
    Posts
    41
    I doubt this is going to happen, for a variety of reasons. Neither Berserk or Valve want to be responsible for distributing copyrighted material.

    However, if you really just can't bring yourself to use any kind of online image hosting service or upload the image to your own website/server, there is a way. You can use a file URI (starting with file:/// or file://localhost/) instead of a URL when you set up the game. Then, e-mail the deck images to your buddy along with the .json file. As long as your friend puts the image file in the exact same folder (identical file path), it will load the same on his side.

    You would need to do this with anyone you share the game with, so if that might be more than just your friend, I still recommend looking into the online options.

  4. #4
    Join Date
    Jun 2015
    Posts
    3
    Quote Originally Posted by hooliganj View Post
    I doubt this is going to happen, for a variety of reasons. Neither Berserk or Valve want to be responsible for distributing copyrighted material.

    However, if you really just can't bring yourself to use any kind of online image hosting service or upload the image to your own website/server, there is a way. You can use a file URI (starting with file:/// or file://localhost/) instead of a URL when you set up the game. Then, e-mail the deck images to your buddy along with the .json file. As long as your friend puts the image file in the exact same folder (identical file path), it will load the same on his side.

    You would need to do this with anyone you share the game with, so if that might be more than just your friend, I still recommend looking into the online options.
    Hi, thanks for the reply. We did end up putting images directly in the root directory and using the file:/// protocol. However, I think the copyright issue could be resolved by preventing large JSON from being uploaded to the workshop. That way, friends could use Base64 but only one of them is hosting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •