|
Junior Member
Join Date: Oct 2019
Posts: 19
|
I created 6 characters and output them to JSON. I'm trying to use those JSON files, but I notice a strange discrepency.
All of the objects in actors.actor.1.items have a suffix number on them, and that number does not match from one JSON to the next. For example, Armor Class is stored in the "acArmorClass.69" object for some characters and in the "acArmorClass.70" object for others. This makes it difficult for me to parse the files. Is there some way to nail these suffix numbers down so I can get consistent output? |
#1 |
Junior Member
Join Date: Oct 2019
Posts: 19
|
Bump.
|
#2 |
Senior Member
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623
|
Does your parser have the ability to match up to the last "." in the name?
Farling Author of the Realm Works Import tool, Realm Works Output tool and Realm Works to Foundry module Donations gratefully received via Patreon, Ko-Fi or Paypal |
#3 |
Junior Member
Join Date: Oct 2019
Posts: 19
|
Quote:
Does anyone have any suggestions? |
|
#4 |
Senior Member
Join Date: Feb 2010
Posts: 125
|
I'm not familiar with it, but there's probably something somewhere to split on a delimiter, in which case you could split on the period and just discard the number value.
|
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
The purpose of the suffix numbers is in case there's more than one of the same thing, like two daggers, on the character - they'll have the same Id, but different suffixes. The numbers are just generated based on an internal Id, which is somewhat based on the order things are added to the character (with a lot of exceptions, which is why I say "somewhat").
|
#6 |
Junior Member
Join Date: Oct 2019
Posts: 19
|
That makes sense, Mathias. Thanks.
|
#7 |
|
|