Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: JSON export to allow possible import into Foundry VTT Conan system #9

Open
Muttley opened this issue Jun 15, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@Muttley
Copy link

Muttley commented Jun 15, 2023

Hi,

I'm one of the developers of the Conan system for Foundry VTT. I'm wondering if we could possibly get a way to get a JSON export of a completed character? That way I could add an import process to the Foundry system so people can easily get their character up and running in Foundry without a lot of manual, error-prone data entry.

Cheers

@mcavallo
Copy link
Contributor

Hi @Muttley, thank you for reaching out. I think it would be a great feature that many people could use.

For context: The data structures are all over the place. And a lot of the data is just a bunch of strings. This could make mappings with the Foundry system a bit problematic, but I think there are other parts that will be usable right away.

I'm slowly making progress with some changes required for the print functionality, so how about if I send you a serialized character as soon as I have something? I think we can use that as a starting point for designing the API to connect both points.

@mcavallo mcavallo added the enhancement New feature or request label Jun 16, 2023
@Muttley
Copy link
Author

Muttley commented Jun 17, 2023

Hi @Muttley, thank you for reaching out. I think it would be a great feature that many people could use.

For context: The data structures are all over the place. And a lot of the data is just a bunch of strings. This could make mappings with the Foundry system a bit problematic, but I think there are other parts that will be usable right away.

I'm slowly making progress with some changes required for the print functionality, so how about if I send you a serialized character as soon as I have something? I think we can use that as a starting point for designing the API to connect both points.

That sounds great. The current way we support some external character generators with the Shadowdark system is to just have the user paste a JSON blob into an import box, and then we process it accordingly. Not much in the way of an API.

The only requirement really is a known JSON structure, so as soon as you're ready let me know and I'll have a look at what you create and how we can deal with it. :)

@mcavallo
Copy link
Contributor

@Muttley I put together a sample schema, let me know if you have any comments.

Some thoughts:

  • I included as much info as I could for talents and spells considering you probably don't have access to this in the Foundry system
  • Equipment is in a weird state. The way some of the items are handled is not ideal so you end up with duplicated items during character creation as well as items not being properly categorized (kits, some weapons, pets, mounts)
  • Item qualities are super inconsistent but I plan to fix them soon. My goal is to have them all written exactly as they appear in the books and with the same capitalization (e.g. Hidden 1 instead of Hid1)
  • Also regarding items, I plan to add availability, cost and encumbrance

Here are the types that you might need to parse some of the values. I'm in the process of changing some things because there are a lot inconsistencies, but I hope most of this will not change much.

// Not likely to change
enum TalentCategory {
  Homeland,
  Caste,
  Bloodline,
  Education,
  Nature,
  Archetype,
  Other,
}

// Not likely to change
export enum Attribute {
  Agility,
  Awareness,
  Brawn,
  Coordination,
  Intelligence,
  Personality,
  Willpower,
}

// This is a mess, I'm considering to change it eventually
enum Skill {
  Acrobatics,
  Alchemy,
  Animal_Handling,
  Athletics,
  Craft,
  Command,
  Counsel,
  Discipline,
  Healing,
  Insight,
  Linguistics,
  Lore,
  Melee,
  Observation,
  Parry,
  Persuade,
  Ranged_Weapons,
  Resistance,
  Sailing,
  Society,
  Sorcery,
  Stealth,
  Survival,
  Thievery,
  Siegecraft, // Warfare

  None,
  Career,
  RandomCareer,

  Bard,
  Berserk,
  Veteran,
  Outlaw,
  Falconry,
  MartialArts,
  Philosophy,
  Griot,
  Adherent,

  Max,
}

// Not likely to change
enum ItemType {
  Weapon,
  Armor,
  Shield,
  Other,
}

// Not likely to change
enum ArmorType {
  HeavyClothing,
  LightArmor,
  HeavyArmor,
  VeryHeavyArmor,
}

// Not likely to change
enum WeaponType {
  Sword,
  Knife,
  Cudgel,
  Axe,
  Flexible,
  Polearm,
  Missile,
  Hidden,
  Exotic,
}

// Not likely to change
enum WeaponSize {
  None,
  OneHanded,
  TwoHanded,
  Unbalanced,
  Unwieldy,
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants