stoogoff / sw-adversaries

A simple web app for looking up adversaries for the FFG's Star Wars RPG.
http://swa.stoogoff.com/
68 stars 27 forks source link

Exporting / Importing Custom Characters #32

Open Dethoza opened 4 years ago

Dethoza commented 4 years ago

Do you think it would be possible to add a function that allows a user to export a character as a file or maybe even just serialize it as a json string, which would allow you to share a character with other users, so they can import it on their end?

Great work on this project btw. I use it all the time.

stoogoff commented 4 years ago

It's on my todo list but it's taking me a while to get to it. My plan was to import / export in the same XML format that OggDude's app uses so it's compatible with that.

Dethoza commented 4 years ago

Do you think you'll soley implement a file import or also potentially add an option where a user could paste the (in this case) xml-string into a field to import the character?

stoogoff commented 4 years ago

I hadn't intended to but I can see about adding something. One thing - I don't use OggDudes but I'd assumed it included adversaries. I've just had a quick look for a dataset and nothing I've found has adversary data. Does it not include adversaries or am I missing something?

Dethoza commented 4 years ago

I also don't use OggDudes Program sadly, so I cannot help with that. Yet, I think releasing something that works with your models/objects etc. when it comes to serialization should be step #1, if making it compatible with OggDudes Character Creator is not immediately possible. You could always design it with that compatibility in mind though, so you could quickly add an option for that, when it becomes a possibility.

Basically you just have to create a model, which is used to structure the relevant variables and then export the resulting object the way you desire. Making it a file export makes sending those characters to other users less cluttered (when you imagine having to copy and paste a serialized string ...I think you know what I mean), but also adding the option to get the raw string instead could have some quality of life use cases, when the user wants to archive their character strings by themselves. I hope I brought my idea across well. English is not my first language.

nlx3647 commented 4 years ago

It does use adversaries, but you have to import them manually: 1) start the GM tools. 2) top tab (Adversaries), 3) hit import. The adversaries are in XML files under the Imports folder.

If need be, I can upload a fully functional and populated OggDude character generator.

stoogoff commented 4 years ago

If you can that would be incredibly helpful please.

nlx3647 commented 4 years ago

Sent you a message with the URL.

stoogoff commented 4 years ago

Import / export of adversary data as JSON has been completed in version 2.2.0 and is now live on the site. I haven't added the XML format yet and there's a couple of edge case issues which need to be fixed, but they're minor and I'll aim to get them fixed later this week.

natesroom commented 3 years ago

It does use adversaries, but you have to import them manually:

  1. start the GM tools.
  2. top tab (Adversaries),
  3. hit import. The adversaries are in XML files under the Imports folder.

If need be, I can upload a fully functional and populated OggDude character generator.

Where is the XML file? I was hoping to get the adversaries as CSV files if possible.