5E Character Create Playlist
Page 1 of 2 12 Last
  1. #1

    Notepad++ color codes

    Hello everyone. I am just getting started with my exciting journey with XML using Notepad++ (64 bit) V.7.5.6
    I noticed that as I'm looking at different mods in the program there are different colors for different things (for lack of better terms). For example...most everything is predominately blue. Some are red and others are purple. There is also green in places. An example is <Name type="string'> Some Black Text </name> Name is in blue, Type is red and string is purple. Would someone be side kind as to educate me on why these are colored as such? I am assuming the "string" example is some form of a command name recognized in XML. I've a long way to go before I can effectively code XML but I am a fast learner.

  2. #2
    Hello Sailor (I've always wanted to say that )

    Notepad colour-codes different parts of a program file (XML & LUA in our case) to help distinguise one part or type from another. At lot of advanced text/code editing apps do this, and while it looks strange at first you quickly become used to it and it help speed up your coding because you quickly get to see when the syntax of your code is right or wrong.

    does that help?
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  3. #3
    Mortar's Avatar
    Join Date
    May 2014
    Location
    New Brunswick, Canada
    Posts
    1,127
    Blog Entries
    18
    Once you save the file as XML file the various colors will appear in the file. They are indicating, as you assumed, a specific XML syntax. The color can be used to help identify if you have a missing closing tag, missing " or / in the code. Best way to understand it is create some sample entries within the FG ruleset of your choice and export it. Once you export it, open it up and see how the XML is laid out.

    This page will become your friend, (or hated enemy :P): https://www.fantasygrounds.com/wiki/...ecial:AllPages
    Ultimate License Holder

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,404
    Also, changing the "Language" to XML in Notepad++ will change the highlighting appropriately.
    Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!

  5. #5
    Thanks for the informative replies. I really appreciste it. I admit that with the blank xml sheet I began writing on wasn't saved (its still open on my pc at home). I had opened my exported module I am working on with notepad and though I see similar entries, it doesn't seem to be in the same order as the 5E asset module I am comparing to. There are no "list" entries that I can see and the data for evrrything else seems very... Scattered and disorganized. I definitely want to follow a consistent format.

  6. #6
    Mortar's Avatar
    Join Date
    May 2014
    Location
    New Brunswick, Canada
    Posts
    1,127
    Blog Entries
    18
    The difference in the formatting you see in an exported module, an unpacked module/ruleset, and the code snippets you see in screenshots are all due to the way FG is set up to export data. FG exports alpha-numerically, in that when you open a module you could or will see <combat>, <encounters>,<image>, <library>, <lists>, <reference> as the second level tags under the <root> tag. If its in an unpacked ruleset or module, especially an older one, things can get really messy as data maybe in a similar order, or not depending on the original creator.

    In Notepad++, use the line numbers, indentation and the tree on the left hand side to collapse different tag levels to help you get an idea of how they interact. It aids greatly in keeping data organized.

    I try to keep my the same from module to module (doesn't always happen) and I tend to go in this order: <library>, <image>, <lists>, <reference>, then <combat> or <encounters> as needed
    Ultimate License Holder

  7. #7
    Reporting back. Everything is working beautifully. I have a physical book I am trying my new found magic on by making a private module based on this small book. Notepad is picking up the language as fast as I type it, everything is neat and sensable columns and that color coding sure does make it a lot easier to spot errors. Haveing a lot of fun.

  8. #8
    Mortar's Avatar
    Join Date
    May 2014
    Location
    New Brunswick, Canada
    Posts
    1,127
    Blog Entries
    18
    That's how it begins. Now its an addiction.

    A couple tips to remember...

    1. Save often.
    2. Take a look at the particular ruleset you are using and its wiki. Some of the rulesets have particular syntax for certain data that may differ.

    3. Take breaks.....keep the fun it

    4. Save often.!! <<<< Very important to remember

    5. Ask questions!!
    Ultimate License Holder

  9. #9
    Quote Originally Posted by Mortar View Post
    That's how it begins. Now its an addiction.

    A couple tips to remember...

    1. Save often.
    2. Take a look at the particular ruleset you are using and its wiki. Some of the rulesets have particular syntax for certain data that may differ.

    3. Take breaks.....keep the fun it

    4. Save often.!! <<<< Very important to remember

    5. Ask questions!!
    And one more thing - SAVE OFTEN!!!!!! (and no, we're not kidding)
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  10. #10
    Mortar's Avatar
    Join Date
    May 2014
    Location
    New Brunswick, Canada
    Posts
    1,127
    Blog Entries
    18
    Quote Originally Posted by dulux-oz View Post
    And one more thing - SAVE OFTEN!!!!!! (and no, we're not kidding)
    ^^^^^^ What he said!!!!!!!!
    Ultimate License Holder

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
  •  
5E Product Walkthrough Playlist

Log in

Log in