Giter Site home page Giter Site logo

Comments (3)

Synthoid avatar Synthoid commented on July 22, 2024

Glad to hear that you are enjoying ESD! Sorry I've been so slow at responding to issues recently. Work has kept me pretty busy!

I'm conflicted about this suggestion because while it does allow more flexibility in sheet layout, it adds a lot of complexity for little change in actual data results. I'm not going to close this issue for now, but it's likely that this particular issue will not be circled around to for some time...

from exportsheetdata.

Ryuichiro avatar Ryuichiro commented on July 22, 2024

This is closer to a new feature request, but how about defining dictionaries directly in the header with something like {KEY#Number} and {VAL#Number}.

{#SHEET}{#ROW}Id {#SHEET}{#ROW}[Loot]{#1}{KEY#1} {#SHEET}{#ROW}[Loot]{#1}{VAL#1} {#SHEET}{#ROW}[Loot]{#1}{KEY#2} {#SHEET}{#ROW}[Loot]{#1}{VAL#2} {#SHEET}{#ROW}[Loot]{#2}{KEY#1} {#SHEET}{#ROW}[Loot]{#2}{VAL#1} {#SHEET}{#ROW}[Loot]{#2}{KEY#2} {#SHEET}{#ROW}[Loot]{#2}{VAL#2}
Encounter_1 Item_1 2 Item_2 1 Item_1 3 Item_3 2
[
    {
        "Id": "Encounter_1",
        "Loot": [
            {
                "Item_1": 2,
                "Item_2": 1
            },
            {
                "Item_1": 3,
                "Item_3": 2
            }
        ]
    }
]

I'm currently trying to export weighted loot tables for a project I'm working on and the only way I can think of to achieve a similar purpose with the current tool is creating two separate arrays, one for the Keys and one for the Values.

Workaround Example
{#SHEET}{#ROW}Id {#SHEET}{#ROW}[Loot]{#1}[Items]{#1} {#SHEET}{#ROW}[Loot]{#1}[Weights]{#1} {#SHEET}{#ROW}[Loot]{#1}[Items]{#2} {#SHEET}{#ROW}[Loot]{#1}[Weights]{#2} {#SHEET}{#ROW}[Loot]{#2}[Items]{#1} {#SHEET}{#ROW}[Loot]{#2}[Weights]{#1} {#SHEET}{#ROW}[Loot]{#2}[Items]{#2} {#SHEET}{#ROW}[Loot]{#2}[Weights]{#2}
Encounter_1 Item_1 2 Item_2 1 Item_1 3 Item_3 2
[
    {
        "Id": "Encounter_1",
        "Loot": [
            {
                "Items": [
                    "Item_1",
                    "Item_2"
                ],
                "Weights": [
                    2,
                    1
                ]
            },
            {
                "Items": [
                    "Item_1",
                    "Item_3"
                ],
                "Weights": [
                    3,
                    2
                ]
            }
        ]
    }
]

from exportsheetdata.

Synthoid avatar Synthoid commented on July 22, 2024

This is an interesting idea. I think you can accomplish something similar currently if you don't mind having items grouped as individual objects in the loot array, ie:

{
  "name" : "Item_1",
  "weight" : 2,
  "group" : 0
}

The key formatting for that should look something like:

{#SHEET}{#ROW}[Loot]{#1}name
{#SHEET}{#ROW}[Loot]{#1}weight
{#SHEET}{#ROW}[Loot]{#1}group

I'm out of town currently, but I'll double check the key formatting needed to accomplish this when I get back.

from exportsheetdata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.