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 info about requirements for set bonuses #6

Merged
merged 2 commits into from
Mar 27, 2019

Conversation

squeek502
Copy link
Contributor

@squeek502 squeek502 commented Mar 18, 2019

EDIT: Note that this PR does not account for the case where bonuses are dependent on specific items being worn (add_func 1 in SetItems.txt). See this comment and the ones after it. Updated with Civerb's Ward's special case handled.


set_attributes_num_req and set_attributes_ids_req are companion arrays to set_attributes that stores the number of items that need to be worn or the set ids of the specific set items that need to be worn in order for the corresponding property list to be active. Only one or the other (set_attributes_num_req or set_attributes_ids_req) will exist in the json for any given set item. Only Civerb's Ward uses set_attributs_ids_req, every other set item will use set_attributes_num_req.

Example json output:

"set_attributes": [
  [{"id":43,"name":"Cold Resist +{0}%","values":[40]}]
],
"set_attributes_num_req": [3]

which means that set_attributes[0] requires >= 3 items (since set_attributes_req[0] is 3) of the set to be worn to receive those bonuses

Example json output for Civerb's Ward:

"set_attributes": [
  [ {"id":9,"name":"+{0} to Mana","values":[21]} ],
  [ {"id":45,"name":"Poison Resist +{0}%","values":[25]} ]
],
"set_attributes_ids_req": [1,2]

which means that set_attributes[0] requires set ID 1 to be worn (Civerb's amulet) in order to receive those bonuses, and that set_attributes[1] requires set ID 2 to be worn (Civerb's scepter) in order to receive those bonuses.

Addresses #5


Another example of an IK set item:

  "set_attributes": [
    [
      {
        "id": 48,
        "name": "Adds {0}-{1} Fire Damage",
        "values": [211, 397]
      }
    ],
    [
      {
        "id": 50,
        "name": "Adds {0}-{1} Lightning Damage",
        "values": [7, 477]
      }
    ],
    [
      {
        "id": 54,
        "name": "Adds {0}-{1} Cold Damage",
        "values": [127, 364, 150]
      }
    ],
    [
      {
        "id": 57,
        "name": "Adds {0}-{1} Poison Damage over {2} Seconds",
        "values": [349, 349,150]
      }
    ],
    [
      {
        "id": 52,
        "name": "Adds {0}-{1} Magic Damage",
        "values": [250, 361]
      }
    ]
  ],
  "set_attributes_num_req": [2, 3, 4, 5, 6]

`set_attributes_req` is a companion array to `set_attributes` that stores the number of items that need to be worn for the corresponding property list to be active

Example json output:
```
"set_attributes":[[{"id":43,"name":"Cold Resist +{0}%","values":[40]}]],"set_attributes_req":[3]
```

which means that set_attributes[0] requires >= 3 items (set_attributes_req[0] is 3) of the set to be worn to recieve those bonuses

Addresses nokka#5
@squeek502 squeek502 mentioned this pull request Mar 18, 2019
@squeek502 squeek502 changed the title Add set_attributes_req Add info about requirements for set bonuses Mar 22, 2019
@squeek502
Copy link
Contributor Author

squeek502 commented Mar 22, 2019

Updated to handle the special case of Civerb's Ward. Went with the first option mentioned in this comment. See OP for full description.

@squeek502
Copy link
Contributor Author

squeek502 commented Mar 22, 2019

Note that currently this means the user will have to do some work when displaying these bonuses (check that the correct number of set items are being worn, or that specific set items are being worn). Alternatively, d2s could do those checks and only put the bonuses in the json output if they are actually active. Let me know what you think about that @nokka.

@nokka
Copy link
Owner

nokka commented Mar 25, 2019

You want me to merge it? Not sure if it's possible for you.

@squeek502
Copy link
Contributor Author

Sure, it's ready to merge. Any thoughts on this?

Note that currently this means the user will have to do some work when displaying these bonuses (check that the correct number of set items are being worn, or that specific set items are being worn). Alternatively, d2s could do those checks and only put the bonuses in the json output if they are actually active.

@nokka nokka merged commit 490c56c into nokka:master Mar 27, 2019
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

Successfully merging this pull request may close these issues.

2 participants