Rapier Posted August 14, 2022 Report Share Posted August 14, 2022 I am not, necessarily, looking for help from any specific person but more like an, in general, request for assistance with Export Formats. There are a couple of things I would LIKE to do with EFs. All of these issues I can edit the RTF after exporting and tweak what I need, but then I end up with a checklist of changes and stuff gets forgotten and missed. I am hoping to make this an Export and Run affair. I've been playing with them for the past six weeks or so and I have gotten them really close to what I want (even if I don't necessarily understand how everything specifically works. I know enough XML to follow along and get the general idea if not understanding every particular phrase; I would be open to a "Learn XML to RTF in 20 Days" suggestion! Flash Defense: It would be helpful if Sight and Hearing Flash DEF could be put out on the sheets. I know there is an IF_DEFENSE container, but I don't know enough of how Flash Def is stored to use it. I would imagine there is some kind of OPTION="SIGHTGROUP" that would need to be worked in someplace. I know that Flash Def was pulled because it was too hinky with how it could be purchased (eg Flash Def, Resistant Protection, etc). I just have no way to judge if it is, at all, worth the effort to put into it to try and get it included on the sheet. I am going back and forth on whether esoteric defenses even really need to be on the sheet at all (well, I mean in Powers yes but listed separately out in a DEFENSES section). Movement: I totally agree with the decision to move from purchasing inches of movement to meters. My problem is that with new players, that can be very confusing to do the math at the table. I want to use MATH to do the calculation but it appears that the unit (ie m) is built into the field. If I try to math it, I just get back a -1, because I think I am trying to MATH a non-numeric field. I don't want to change the power build. I am still perfectly ok with purchasing and displaying the power as 24m of Running, but on the Characteristics Block I would like it to say 12" instead of 24m. I'm not even sure that is possible and I may just have to adjust that myself. I'm trying to do a REG_REPLACE for 1/3 to the fraction version and am having problems. 1/4 (00BC), 1/2 (00BD), and 3/4 (00BE) are in there already as their two digit counterparts dropping the initial 00. But the code for 1/3 (2153) and it is only accepting a two digit code. Again, I can easily edit this, but it's one more thing to keep my hands on. Thanks! Quote Link to comment Share on other sites More sharing options...
Simon Posted August 15, 2022 Report Share Posted August 15, 2022 Flash Defense: Not going to be easy...it _is_ a Defense Power, so you can output it along with all other Defense Powers using the IF_DEFENSE container...but isolating to just Sight and Hearing is going to require some fairly complex shenanigans with regex (see below for general guidance). Movement: you're correct in why the MATH container is going to return -1 -- the field is non-numeric (has either m or " appended to the end...plus secondary values, etc.). It may be possible to do what you're after with some regex... Regex in general: it's really not for the faint of heart, but can be extremely powerful if you take the time. I'd recommend reading up on regex in general and then digging into some of the minor idiosyncrasies that Java's implementation of it has. A general tip: adding in a unique string to the output can help. For example, if trying to isolate Flash Defense from a list of all Defense Powers (such as what you would get using the IF_DEFENSE container), have each entry export it's normal/desired output plus some additional identifying information that you can use in your regex to identify each entry. The REG_REPLACE would key in on those identifying strings and remove them, plus any other operations you want to perform on the contents. Not going to be easy, but with enough work (likely a LOT) it should let you get at what you want. The main warning I'd put on this is that the MATH container is evaluated before the REG_REPLACE container (intentionally)...so you wouldn't be able to perform post-regex math processing unless you're dealing with an export format that allows for scripting (like HTML), in which case you could use JavaScript to perform mathematic operations on the exported output (that's been transformed by the REG_REPLACE process) and then output it in the proper location on the sheet. Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 15, 2022 Author Report Share Posted August 15, 2022 I was afraid of this. I will dig into Regex and take a look. This is a back burner project at this point. I have my Export Format exactly as I want it and am very happy so these were all Quality of Life Improvements. If I just have to fix the 1/3 on MoveBy by hand, that is not so bad, and I can always do the movement by hand. That list is short enough that I shouldn't have too much problem making those edits after the fact until I have the spare time to really dig into Regex. I don't necessarily JUST need Sight/Hearing Flash DEF. I was just zeroing in on those because those are the most common and adding two fields sounded easier (initially) that all six. I would be perfectly happy spitting out ALL the Flash Defs. Would that be less complex? Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 15, 2022 Report Share Posted August 15, 2022 What are you using to read the RTF file into? Word? Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 15, 2022 Author Report Share Posted August 15, 2022 42 minutes ago, HeroGM said: What are you using to read the RTF file into? Word? Yes. Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 15, 2022 Report Share Posted August 15, 2022 Trying to remember if word still does macros Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 16, 2022 Author Report Share Posted August 16, 2022 10 hours ago, HeroGM said: Trying to remember if word still does macros Yeah, it does. Like I said, it's not a huge problem and certainly not insurmountable. It's just a quality of life thing. When I am cranking out character sheets it is one less thing to worry about. When I am prepping for a convention I am usually printing 35 or 40 player characters. Anything I can do to automate the process more is a good thing. Right now I have a file with nothing but the maneuvers block so I can cut/paste that over what the sheet spits out. It's faster and easier to replace the entire section than just that one 1/3. I could also add 1/3 to the autocorrect but it would be safer and easier to just do it by hand. We don't have many 1/3s on a character sheet and I wouldn't want my 1 PD, 3 rPD of 1/3 to end up as a fraction. Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 17, 2022 Report Share Posted August 17, 2022 I know you can do math on some.of.rhe movement numbers, I'll have to dig my notes out and play with it. Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 17, 2022 Report Share Posted August 17, 2022 Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 18, 2022 Author Report Share Posted August 18, 2022 14 hours ago, HeroGM said: When I tried this I still get -1. Could this be an RTF thing? This is so weird. I still get -1. I tried inside and outside the IF_RUNNING. I am not certain it has any effect, but I would need this to be inside the IF statement so that I could also do Teleport and things. I still get -1. ---------------------- OMG. I got it. <!--IF_RUNNING-->\tab Running:\tab<!--Math--><!--RUNNING_TOTAL-->/2<!--/MATH-->" Noncombat: <!--RUNNING_TOTAL_NONCOMBAT--><!--/IF_RUNNING--> This worked. WOOHOO! You got me there! I, sir, owe you a donut. And not no chintzy lil munchkin but a full on adult-sized donut. Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 18, 2022 Author Report Share Posted August 18, 2022 I does seem that purchasing Secondary Running throws everything off and I just get 0s. That isn't perfectly ideal but I can work with that. How often do we handle secondary movement anyway? Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 18, 2022 Author Report Share Posted August 18, 2022 Movement: Running: 11"/22" Flight: 15"/30" Leaping: 7"/14" Swimming: 10"/20" Swinging: 10"/20" Teleportation: 15"/30" Tunneling: 3"/5" woohoo!! I found that you DEF need a space in there for everything to work. This is my RTF block: \tx1125\tx2500 \b1 Movement:\b0 <!--IF_RUNNING-->\tab Running:\tab <!--Math--><!--RUNNING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--RUNNING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_RUNNING--> <!--IF_FLIGHT-->\par\tab Flight:\tab <!--Math--><!--FLIGHT_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--FLIGHT_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_FLIGHT--> <!--IF_GLIDING-->\par\tab Gliding:\tab <!--Math--><!--GLIDING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--GLIDING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_GLIDING--> <!--IF_LEAPING-->\par\tab Leaping:\tab <!--Math--><!--LEAPING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--LEAPING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_LEAPING--> <!--IF_SWIMMING-->\par\tab Swimming:\tab <!--Math--><!--SWIMMING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--SWIMMING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_SWIMMING--> <!--IF_SWINGING-->\par\tab Swinging:\tab <!--Math--><!--SWINGING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--SWINGING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_SWINGING--> <!--IF_TELEPORTATION-->\par\tab Teleportation:\tab <!--Math--><!--TELEPORTATION_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--TELEPORTATION_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_TELEPORTATION--> <!--IF_TUNNELING-->\par\tab Tunneling:\tab <!--Math--><!--TUNNELING_TOTAL-->/2<!--/MATH-->"/<!--Math--><!--TUNNELING_TOTAL_NONCOMBAT-->/2<!--/MATH-->"<!--/IF_TUNNELING--> \par\pard Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 18, 2022 Author Report Share Posted August 18, 2022 Oh, and for anyone following this, I will be posting these for download in the next couple of days. I have one I use for players (and conventions) without any points on them. That is the one I am working on now and when I am perfectly happy with it I will add the costs back in. This is what the No Points looks like. Flying Lotus.RTF Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 18, 2022 Report Share Posted August 18, 2022 It's not a perfect or elegant solution I know, I'm glad it helps you get what you're looking for on things. I don't know if you've seen them, but I (and others?) have loaded up Rob Miller's rtf files and I don't think he'd mind too much if you looked and disceted them. Just give him some credit if you pass them out. Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 18, 2022 Author Report Share Posted August 18, 2022 1 hour ago, HeroGM said: It's not a perfect or elegant solution I know, I'm glad it helps you get what you're looking for on things. I don't know if you've seen them, but I (and others?) have loaded up Rob Miller's rtf files and I don't think he'd mind too much if you looked and disceted them. Just give him some credit if you pass them out. Where do you think I got the basic one I used? HeroGM 1 Quote Link to comment Share on other sites More sharing options...
HeroGM Posted August 19, 2022 Report Share Posted August 19, 2022 9 hours ago, Rapier said: Where do you think I got the basic one I used? Hey Rocky, watch me pull a rabbit out of my hat! AGAIN?? Quote Link to comment Share on other sites More sharing options...
Rapier Posted August 19, 2022 Author Report Share Posted August 19, 2022 17 hours ago, HeroGM said: Hey Rocky, watch me pull a rabbit out of my hat! AGAIN?? RAWR! 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.