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

Add Hunting Horn Melodies #52

Open
neftalimich opened this issue Jul 9, 2018 · 1 comment
Open

Add Hunting Horn Melodies #52

neftalimich opened this issue Jul 9, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@neftalimich
Copy link
Contributor

I've been working on this:

mhw-builder-melodies

what it is better to use in this case, "tsv" or json?
let me know what do you think.

@TurkeyTickle TurkeyTickle added the enhancement New feature or request label Jul 9, 2018
@TurkeyTickle
Copy link
Owner

Looking good! In general, I've been using tsv for data that may need to be modified or added to often (weapons, armor, charms, etc) and json for data that seems relatively static and/or has a lot of description text (skills, augmentations, weapon modifiers, etc). My thinking behind that was that I wanted to be able to easily add things like armor and weapons by editing the file in Excel or something similar.

With that said, normally I would say I would use tsv for at least the melodies file, but this might be a case where json is better. Consider something like this for example:

[
    {
        "weaponId": 279,
        "notes": "p;r;b2",
        "melodies": [
            {
                "effectId": "selfImprovement",
                "notes": "p;p"
            },
            {
                "effectId": "attackUpL",
                "notes": "p;r;b2;p"
            },
            {
                "effectId": "healthBoostL",
                "notes": "r;b2;r;p"
            },
            ...
        ]
    },
    ...
]

What I like about this format is that it ties the melody and effect together more closely instead of relying on matching up indexes from the melodies and melodyEffect columns in the tsv. I also like using a string for the effect ids so you don't need to look up the id in the melody-effect file to know what it is. Using string ids like that has saved me a lot of time while adding new weapons/armor. One downside to this format is obviously that the file is going to be much larger and make page loads very slightly slower which can add up over time.

I think there are good arguments for both formats, but I guess I would probably lean towards json. I think it'll be fine either way though, so I think you should use whatever feels best to you. We can always adjust later if needed.

Just a heads up though - something I've been considering for a while is moving all the data into a sqlite db or something. I'm not sure if/when I'll get around to doing that, but the more data we add, the more sense it makes.

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
None yet
Development

No branches or pull requests

2 participants