Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Online Forums > HLO - Pathfinder 2nd Edition

Notices

Reply
 
Thread Tools Display Modes
GMScott
Junior Member
 
Join Date: Oct 2019
Posts: 19

Old March 6th, 2021, 10:10 AM
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?
Attached Images
File Type: png hlo-json-strangeness.png (338.7 KB, 7 views)
GMScott is offline   #1 Reply With Quote
GMScott
Junior Member
 
Join Date: Oct 2019
Posts: 19

Old March 12th, 2021, 04:35 PM
Bump.
GMScott is offline   #2 Reply With Quote
Farling
Senior Member
 
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623

Old March 18th, 2021, 03:32 PM
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
Farling is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,207

Old March 19th, 2021, 08:31 AM
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").
Mathias is online now   #4 Reply With Quote
GMScott
Junior Member
 
Join Date: Oct 2019
Posts: 19

Old April 22nd, 2021, 08:53 AM
Quote:
Originally Posted by Farling View Post
Does your parser have the ability to match up to the last "." in the name?
That's a great question... to which I do not know the answer. I'm using Excel's Power Query. More like learning it. I can't seem to figure out how to get it to ignore everything past the period.

Does anyone have any suggestions?
Attached Images
File Type: jpg HLO-ExcelPowerQuery.jpg (189.3 KB, 3 views)
GMScott is offline   #5 Reply With Quote
GMScott
Junior Member
 
Join Date: Oct 2019
Posts: 19

Old April 22nd, 2021, 08:59 AM
That makes sense, Mathias. Thanks.
GMScott is offline   #6 Reply With Quote
Roadie
Senior Member
 
Join Date: Feb 2010
Posts: 125

Old April 22nd, 2021, 01:26 PM
Quote:
Originally Posted by GMScott View Post
That's a great question... to which I do not know the answer. I'm using Excel's Power Query. More like learning it. I can't seem to figure out how to get it to ignore everything past the period.

Does anyone have any suggestions?
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.
Roadie is offline   #7 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:55 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.