Jump to content

TheUnderground

HERO Member
  • Posts

    7
  • Joined

  • Last visited

TheUnderground's Achievements

  1. Okay, nope, definitely on me. I did some testing, and you're correct, both replacement functions work on the entire document. Sorry, tried to edit my previous posts, but couldn't figure out how to do that.
  2. Just to be sure I'm being 100% clear: Hero Designer has two inputs in the exporting process, right? The data from the character sheet inside Hero Designer (i.e. Powers, Characteristics, Background, etc.) , and the data from the export format (i.e. html tags, other strings in the HDE file, etc.). It appears that REPLACE only works on the data from the character sheet, while REG_REPLACE applies to both inputs. If that's not the intended behaviour, then I think I found a bug.
  3. I may have found a bug, then. When I did REPLACE on span and div, I double-checked that I had the syntax correctly by replacing the span and div with the character's name and a random word. The span/div replacement did nothing; the character name replacement worked. The case was correct. If it were working on the whole document, it should've turned the spans into divs. When I tried putting the line break sequence inside the BACKGROUND container, it acted on everything but the BACKGROUND. So I'm not sure if I'm doing something wrong or it's a bug, but you can see the exact statement I used in my last post. Anyhow, it's not a huge deal. I can post-process the sheets manually. I really appreciate your help!
  4. So, I tried a few things with the following line: <!--REG_REPLACE--><!--REGSTRING-->\n<!--/REGSTRING--><!--REPSTRING--><br/><!--/REPSTRING--><!--/REG_REPLACE--> But they applied it to the entire HTML of the output format, not just to generated content. Any line breaks in the export format template were converted to <br/>, not just the line breaks in Hero Designer content. Oddly, when I tried this: <!--BACKGROUND--><!--REG_REPLACE--><!--REGSTRING-->\n<!--/REGSTRING--><!--REPSTRING--><br class="linebreak" /><!--/REPSTRING--><!--/REG_REPLACE--><!--/BACKGROUND--> it applied it to everything except the background. As an experiment, I tried this: <!--REPLACE--><!--DEFSTRING-->span</!--DEFSTRING--><!--REPSTRING-->div<!--/REPSTRING--><!--/REPLACE--> The non-regex replace function had no impact on the template stuff. My spans didn't turn into divs. Same code, but with the regex stuff? Turned my spans into divs. Any suggestions? I'm just trying to get line breaks in the content like the things in the Background tab, notes on Powers and such, etc. I'm using the 20221216 build of Hero Designer.
  5. Another export format question -- I'm trying to replace line breaks ("\n") in the data from the "Background" tab in Hero Designer. The documentation doesn't say exactly where you'd use REG_REPLACE. Do I put it at the head of the HDE file, or...? Do I expand the comment tags and put it inside them, like this: <!--PERSONALITY--><!--REG_REPLACE-->..<!--/REG_REPLACE--><!--/PERSONALITY--> Thank you!
  6. Hi! I have an export template where I changed this: <table class="Container"> <!--IF_BACKGROUND--> <tr> <td class="CharacterNotesLabel">Background:</td> </tr> <tr> <td class="CharacterNotesContent"><!--BACKGROUND--></td> </tr> <!--/IF_BACKGROUND--> <!--IF_PERSONALITY--> <tr> <td class="CharacterNotesLabel">Personality:</td> </tr> <tr> <td class="CharacterNotesContent"><!--PERSONALITY--></td> </tr> <!--/IF_PERSONALITY--> <!--IF_TACTICS--> <tr> <td class="CharacterNotesLabel">Powers/Tactics:</td> </tr> <tr> <td class="CharacterNotesContent"><!--TACTICS--></td> </tr> <!--/IF_TACTICS--> <!--IF_CAMPAIGN_USE--> <tr> <td class="CharacterNotesLabel">Campaign Use:</td> </tr> <tr> <td class="CharacterNotesContent"><!--CAMPAIGN_USE--></td> </tr> <!--/IF_CAMPAIGN_USE--> <!--IF_APPEARANCE--> <tr> <td class="CharacterNotesLabel">Appearance:</td> </tr> <tr> <td class="CharacterNotesContent"><!--APPEARANCE--></td> </tr> <!--/IF_APPEARANCE--> </table> into this: <div class="CharacterNotes"> <p class="Title">Character Notes</p> <!--IF_IMAGE--> <img src="<!--IMAGE_RELATIVE_URL-->" class="CharacterPicture"></img> <!--/IF_IMAGE--> <!--IF_BACKGROUND--> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Background:</div> <div class="CharacterNotesContent"><!--BACKGROUND--></div> </div> <!--/IF_BACKGROUND--> <!--IF_PERSONALITY--> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Personality:</div> <div class="CharacterNotesContent"><!--PERSONALITY--></div> </div> <!--/IF_PERSONALITY--> <!--IF_TACTICS--> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Powers/Tactics:</div> <div class="CharacterNotesContent"><!--TACTICS--></div> </div> <!--/IF_TACTICS--> <!--IF_CAMPAIGN_USE--> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Campaign Use:</div> <div class="CharacterNotesContent"><!--CAMPAIGN_USE--></div> </div> <!--/IF_CAMPAIGN_USE---> <!--IF_APPEARANCE---> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Appearance:</div> <div class="CharacterNotesContent"><!--APPEARANCE--></div> </div> <!--/IF_APPEARANCE---> </div> Previously, it worked. Now the content is coming out like this: <div class="CharacterNotes"> <p class="Title">Character Notes</p> <img src="picture.png" class="CharacterPicture"></img> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Background:</div> <div class="CharacterNotesContent">background text</div> </div> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Personality:</div> <div class="CharacterNotesContent">personality text</div> </div> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Powers/Tactics:</div> <div class="CharacterNotesContent">powers text</div> </div> <!--IF_CAMPAIGN_USE--> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Campaign Use:</div> <div class="CharacterNotesContent"></div> </div> <!--/IF_CAMPAIGN_USE---> <!--IF_APPEARANCE---> <div class="CharacterNotesContainer"> <div class="CharacterNotesLabel">Appearance:</div> <div class="CharacterNotesContent">appearance text</div> </div><!--/IF_APPEARANCE---> </div> And it's not respecting the conditionals. Any idea what I'm doing wrong? Thanks!
×
×
  • Create New...