eepjr24 Posted February 20, 2022 Report Share Posted February 20, 2022 I have a feeling the answer is no, but better to ask and be sure. Are there any command line options for Hero Designer, for instance for exporting characters? - E Quote Link to comment Share on other sites More sharing options...
HeroGM Posted February 20, 2022 Report Share Posted February 20, 2022 I've asked before and iirc the answer is no. Quote Link to comment Share on other sites More sharing options...
Simon Posted February 20, 2022 Report Share Posted February 20, 2022 The answer is mostly no -- HD can be run without a UI, but that needs to be done programmatically (i.e. a separate Java application can create an instance of HD without any graphics, intended for creating exports of character files) Quote Link to comment Share on other sites More sharing options...
HeroGM Posted February 20, 2022 Report Share Posted February 20, 2022 2 hours ago, Simon said: The answer is mostly no -- HD can be run without a UI, but that needs to be done programmatically (i.e. a separate Java application can create an instance of HD without any graphics, intended for creating exports of character files) I'm curious how you do that Quote Link to comment Share on other sites More sharing options...
unclevlad Posted February 21, 2022 Report Share Posted February 21, 2022 HD is just a jar. Java can open and run a jar file, typically in its own thread, instantiating a variable. There's an option to open in headless (no GUI) mode that's probably what you'd need to do. That should give you the main dialog's controls to do things to open files, export, etc. It's probably easier to just use HD unless you intend to do that a lot. Option 2: .HDC files are just XML. It would take some work, but building a parser for them wouldn't be too bad. OK, I did this for data analytic purposes for several years, so my notion of "not too bad" might be different. It might have to be a constant work in progress, depending on what you want to support...I'm thinking things like auto-calculating (and displaying) adjusted height and/or weight based on the powers that tweak them (DI, alternate Desolid if you incorporate it, Growth, Shrinking). Or something I'd probably do: show net speed, for running, swimming, or flight, both combat and non-combat, or similarly distance covered for leap or teleport. Especially if you, like me, maybe slap a Naked Advantage onto Teleport, for MegaScale. Because by the rules, a Teleport with MegaScale is *always* non-combat, and thus takes an extra phase. Doesn't work real well in combat. Same with Flight, given that I have a High Scale advantage that's similar to MegaScale, but not as ludicrously fast. The parsing is easy enough. I'm used to SAX parsing so that's what I'd do. Linking up the info...that'll take some thought but the mechanisms are there to do it. I wouldn't say this is for a novice coder, but it won't be rocket science either. And it need not be Java, if there's some other language you prefer for text processing, with good XML support. I would say, if you don't know Java, you'll have some problems. The attribute names aren't always self-explanatory; how they combine is, at times, less than clear. Having the code base helps...but only if you can read it. You also need the template for some specifics, too; for example, in the HDC file, for characteristics, there's Levels (how much did you buy up) but the Cost Per Level isn't there. That's in the template. The template has the full, but empty, power/skill/characteristic object; the HDC file has the user-specified data to fill it out. Now, OK, maybe you don't need to export the costs; for play purposes, you may not need them, or need only easy ones to look up. But that's why this might be a long-term work-in-progress. And it's not nearly as bad as refactoring the entire HD code base. THAT is a royal PITA. Quote Link to comment Share on other sites More sharing options...
Simon Posted February 21, 2022 Report Share Posted February 21, 2022 18 hours ago, HeroGM said: I'm curious how you do that call the overloaded singleton getter: com.hero.HeroDesigner.getInstance(true); That'll give you an instance of HD without a GUI constructed. From there you can call the non-GUI methods as normal (loading characters, exporting, etc.). Most of the methods you'd be calling will be in the HeroDesigner class itself. 12 hours ago, unclevlad said: HD is just a jar. Java can open and run a jar file, typically in its own thread, instantiating a variable. There's an option to open in headless (no GUI) mode that's probably what you'd need to do. That should give you the main dialog's controls to do things to open files, export, etc. It's probably easier to just use HD unless you intend to do that a lot. Option 2: .HDC files are just XML. It would take some work, but building a parser for them wouldn't be too bad. OK, I did this for data analytic purposes for several years, so my notion of "not too bad" might be different. It might have to be a constant work in progress, depending on what you want to support...I'm thinking things like auto-calculating (and displaying) adjusted height and/or weight based on the powers that tweak them (DI, alternate Desolid if you incorporate it, Growth, Shrinking). Or something I'd probably do: show net speed, for running, swimming, or flight, both combat and non-combat, or similarly distance covered for leap or teleport. Especially if you, like me, maybe slap a Naked Advantage onto Teleport, for MegaScale. Because by the rules, a Teleport with MegaScale is *always* non-combat, and thus takes an extra phase. Doesn't work real well in combat. Same with Flight, given that I have a High Scale advantage that's similar to MegaScale, but not as ludicrously fast. The parsing is easy enough. I'm used to SAX parsing so that's what I'd do. Linking up the info...that'll take some thought but the mechanisms are there to do it. I wouldn't say this is for a novice coder, but it won't be rocket science either. And it need not be Java, if there's some other language you prefer for text processing, with good XML support. I would say, if you don't know Java, you'll have some problems. The attribute names aren't always self-explanatory; how they combine is, at times, less than clear. Having the code base helps...but only if you can read it. You also need the template for some specifics, too; for example, in the HDC file, for characteristics, there's Levels (how much did you buy up) but the Cost Per Level isn't there. That's in the template. The template has the full, but empty, power/skill/characteristic object; the HDC file has the user-specified data to fill it out. Now, OK, maybe you don't need to export the costs; for play purposes, you may not need them, or need only easy ones to look up. But that's why this might be a long-term work-in-progress. And it's not nearly as bad as refactoring the entire HD code base. THAT is a royal PITA. You'd be refactoring more than you think -- the HDC files are only half of the story. They have the build information (how many levels, what options are selected, etc.) but the rules are contained in the template -- you need to combine the two to get at a full character (determining costs for abilities, etc.). And that wouldn't take into account the...idiosyncrasies in display, layout, and cross-ability interaction that need code to handle. Killer Shrike 1 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.