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

Export ADF as JSON #164

Open
rgr78 opened this issue Jul 27, 2024 · 1 comment
Open

Export ADF as JSON #164

rgr78 opened this issue Jul 27, 2024 · 1 comment

Comments

@rgr78
Copy link

rgr78 commented Jul 27, 2024

Hi.

I was wondering if you could implement a new feature: export ADF files as JSON. Or, make the text export parseable as JSON.

For example, instead of

--------instances
instances	ed7e7e79	c5333160	equipment_ammo_bh_bow_arrow_420	152	128	00000098-00000118
# Structure AmmunitionTuning(0xC5333160), Data Offset: 152(0x00000098)
{
  ammunition_class:
    # Array of Structure AmmunitionClass(0x4BCCE369), Data Offset: 272(0x00000110), Info Offset: 152(0x00000098)
    [
      # Structure AmmunitionClass(0xF18AFACE), Data Offset: 272(0x00000110)
      {
        level:
          2  # uint08(0x0CA2821D), Data Offset: 272(0x00000110)
      }
      # Structure AmmunitionClass(0xF18AFACE), Data Offset: 273(0x00000111)
      {
        level:
          3  # uint08(0x0CA2821D), Data Offset: 273(0x00000111)
      }
      # Structure AmmunitionClass(0xF18AFACE), Data Offset: 274(0x00000112)
      {
        level:
          4  # uint08(0x0CA2821D), Data Offset: 274(0x00000112)
      }
      # Structure AmmunitionClass(0xF18AFACE), Data Offset: 275(0x00000113)
      {
        level:
          5  # uint08(0x0CA2821D), Data Offset: 275(0x00000113)
      }

Something like:

{
    "ammunition_class": [
        {
            "level": 2
        },
        {
            "level": 3
        },
        {
            "level": 4
        },
        {
            "level": 5
        }
    ]
}

It's mostly the lack of commas in the strings, and the colons on the arrays.

@GrizzlyNZ
Copy link

You could find / create a Python script to export a .JSON file from a .TXT format (Extracted as text from DECA).

ChatGPT could be a good tool to create this script for you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants