STAR TREK 2d20
Page 3 of 3 First 123
  1. #21
    Lol don't keep changing the code so much :P You might end up saying wait what?... and then its like OMG what have I been doing! lol (Happened to me a couple of times :c)

    I've stuck with using a stringbuilder and basically just go about appending to it as I go along, finally when its all done I just parse the entire thing and it seems to work. The only problem with my solution I think would be at the time of public use where in people would not know where exactly the formatting is broken. Would need to think about this. However if they use the tool attached to the parser I think they should have this problem since it serves as a validation to the data inputs.

  2. #22
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Well... it's how my ADHD brain works... I plow ahead and just work... somehow my experience and whatever innate skills I have kick in and I write code that even though I refactor often as I go along - I seem to be able to get through it relatively quickly. In any event, my code goes through QA with a considerably lesser amount of builds than others on the Trading System team.

    As for readability, it usually is pretty good since I tend to comment it via use of careful naming (I've been known to check with peers in the office about selecting the "right" name for something I am on the fence about ) and comments where assumptions are made and/or code might need summarization. I find consistency and naming helps the most in readability - more than even comments (although I tend to Doxygen/javadoc them as well ;P)

    I'm not shooting for "best" ways on this pass as I expect I will be using non-idiomatic Java due to the fact that I haven't even finished reading Core Java Vol1 yet as I work on this. Java is close enough (which can be error inducing for me, especially when new-ing) to C++ that the 25 or so years I've coded with it (only since '96 professionally - it was a second career after teaching myself a couple languages) that I can "wing it" well enough coupled with looking up on iPad's book library for specific things I need to reference as I go.

    Since the familiarizing with Java on a "real world" app is the original goal, rewrites aren't a bad thing.


    PS -> And of course, I am using source control with commented check-ins so... there's that for memory jogging as well
    Last edited by Varsuuk; June 5th, 2016 at 07:25.

  3. #23
    Haha nice one, good to see that you enjoy coding so much! Under work standards I get pretty bored with the tasks that are given to me, but when coding for FG community man I cant wait for the weekends to come up! I guess its the no deadlines, no holes bared anything goes kinda fun

  4. #24
    Varsuuk's Avatar
    Join Date
    Dec 2015
    Location
    New York
    Posts
    2,075
    Bummer
    I outsmarted myself...

    I have made a few "stylistic" changes to the generated XML for clarity/ease of human-reading. For the most part they have been very helpful to me.
    One basic change I made unfortunately backfires on me when linking to content not parsed with my app.

    "Acolyte Personality Trait" when parsed by PAR5E becomes: "acolytepersonalitytrait"; when parsed by me: " acolytePersonalityTrait"
    Not a problem, except where #zal links are involved - they will not catch "existing" items from FG modules (or likely other creator's modules since they will (wisely) emulate the FG element naming ;P)

    So... ya, I had to replace the call to my String toCamelCase(String name) with name.toLowerCase(). Luckily, for me, this was only in one place since toCamelCase(...) was only called from toElementName(...) thus far

    Noted.

    I am keeping my avoidance of id-0001 style elements however. KP, or anyone else, if you know why that may be a prob in future - let me know. Right now, only completed Background and Table input file parsing.
    Think I'll go to NPC next for a meatier one.

  5. #25
    If the links are to modules created by your applications alone I guess the camel casing should work, however considering that Zeus application is the standard for official FG modules, I guess the newer parsers would also need to follow its standards should it wish to be compatible.

    With regards to id-001 tags, I guess these are solely for numbering, I have recently released an NPC parser and within it you would see NPC attacks and actions etc all numbered following that standard.

  6. #26
    Well time for my embarrassment, so I just released the NPC parser and suddenly realized that within a loop I forgot to switch the NPC as the loop is completed. So for every alphabet the categories there would be just one NPC. :c

  7. #27
    Zacchaeus's Avatar
    Join Date
    Dec 2014
    Location
    Scotland
    Posts
    20,851
    Quote Originally Posted by kp9911 View Post
    Well time for my embarrassment, so I just released the NPC parser and suddenly realized that within a loop I forgot to switch the NPC as the loop is completed. So for every alphabet the categories there would be just one NPC. :c
    Nice one
    If there is something that you would like to see in Fantasy Grounds that isn't currently part of the software or if there is something you think would improve a ruleset then add your idea here https://www.fantasygrounds.com/featu...rerequests.php

  8. #28
    Necroing this, since potential developers can collaborate via this thread. (Found it on page 15 OMG)
    My Project : FG5EParser LINK

    Current Projects : Revamped FG5eParser v2!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in