eepjr24 Posted August 10, 2021 Report Share Posted August 10, 2021 Trying to work out list export to JSON. I can identify the number of each item in the list with <!--IS_LIST_ITEM--><!--LISTPREFIX--><!--/IS_LIST_ITEM-->, and I can look backwards to the nearest <!--IS_LIST--><!--/IS_LIST--> to find WHICH list it is a part of for instances with multiple lists. Is there a way to determine whether the list is a framework or simply a list? Is there a way in code to distinguish between framework types (MP, VPP?)? Also, how do you distinguish between a fixed and variable slot (so that they can be displayed as such on the sheet)? - Ernie Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 10, 2021 Report Share Posted August 10, 2021 <!--IS_MP--> <!--/IS_MP--> <!--IS_EC--> <!--/IS_EC--> <!--IS_VPP--> <!--/IS_VPP--> eepjr24 1 Quote Link to comment Share on other sites More sharing options...
Simon Posted August 10, 2021 Report Share Posted August 10, 2021 For distinguishing between fixed and variable slots, you can combine the already mentioned IS_MP with some clever use of ATTRIBUTE_VALUE and the isUltra() method (part of com.hero.objects.GenericObject) -- that will return true/false (as a string)....if true, you're dealing with a fixed slot. If false, you're dealing with a variable slot. eepjr24 1 Quote Link to comment Share on other sites More sharing options...
HeroGM Posted December 6, 2021 Report Share Posted December 6, 2021 How would we call the isUltra() in an Export? Quote Link to comment Share on other sites More sharing options...
schir1964 Posted December 6, 2021 Report Share Posted December 6, 2021 5 hours ago, HeroGM said: How would we call the isUltra() in an Export? <!--POWERS--> <!--ATTRIBUTE_VALUE-->isULTRA<!--/ATTRIBUTE_VALUE--> <!--/POWERS--> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.