[v1.20] Reporting code

Did you find a bug in the Loot Divider?
Report it here! Please include all details necessary to recreate the bug!
Post Reply
User avatar
patransom
Divine Rank 1
Divine Rank 1
Posts: 5887
Joined: Wed Aug 03, 2005 8:40 pm
Location: Arlington, Virginia

[v1.20] Reporting code

Post by patransom » Mon Jul 26, 2010 10:31 am

When I copy and paste the code from the BBCode box of the Loot Divider in a post here, this is what it looks like:

"Loot for each of the 4 players: 16 gp, 2 sp (standard rate of 50%)
[*] Shards of Black Glass$20
[*] Elven Armband $45
[*] Wand of Shatter (7 charges)$315 {Marcus}
Generated by the Loot Divider, Version 1.20
"




Including all that space above this sentence.

So it seems like the code box is:
  • Adding extraneous space (they appear to be tabs) at the end of the list
  • Missing the list code that turns asterisks into bullets (yes, I have the code defined properly in the box at right; I haven't changed it since downloading)
  • Adding quotation marks around the text.
For the record, here's the actual code pasted in:

Code: Select all

"[B][U]Loot for each of the 4 players: [color=#BF0000]16 gp, 2 sp[/color] (standard rate of 50%)[/U][/B]
[*] Shards of Black Glass$20
[*] Elven Armband $45
[*] Wand of Shatter (7 charges)$315 {[color=#008000]Marcus[/color]}
[size=85]Generated by the [url=http://LootDivider.com]Loot Divider[/url], Version 1.20[/size]
"						
						
						
						
						
Image

User avatar
Duniagdra
Divine Rank 21
Divine Rank 21
Posts: 6880
Joined: Sat Dec 29, 2007 5:17 pm
Location: Newark, New Jersey, USA
Contact:

Re: Reporting code (v1.20)

Post by Duniagdra » Mon Jul 26, 2010 10:56 am

Are you sure you're selecting the right box to copy from?


Here's the code from the BBCode for v1.20 that I have.

Code: Select all

"[B][U]Loot for each of the 6 players: [color=#BF0000]1,067 gp, 5 sp[/color] (standard rate of 50%)[/U][/B]
[B][U]Rise of the Kobold King; Below The Monastery[/U][/B][list][/list]
[B][U]Gelatinous Cube[/U][/B][list]
[*] Full Plate Armor [Mithral] (5,250gp)
[*] Battleaxe [+1] (1,155gp)[/list]
[size=85]Generated by the [url=http://LootDivider.com]Loot Divider[/url], Version 1.20[/size]
"						
						
						
						
						
Here's the output:
"Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%)
Rise of the Kobold King; Below The Monastery
    Gelatinous Cube
    • Full Plate Armor [Mithral] (5,250gp)
    • Battleaxe [+1] (1,155gp)
    Generated by the Loot Divider, Version 1.20
    "




    Here's my cleaned up modification:
    Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%)
    Rise of the Kobold King; Below The Monastery
    • Gelatinous Cube
      • Full Plate Armor [Mithral] (5,250gp)
      • Battleaxe [+1] (1,155gp)
    Generated by the Loot Divider, Version 1.20

    I just delete the quotes and extra lines and move the first closing list tag to the last closing list tag to group things together.

    Admin is aware of this from during the initial development of the LD. Not sure if he went further in figuring out how to do away with the quotes and extra space though.
    Image Marcus Tilsworth - Human Sorcerer
    Image Ulyuk Bok - Elan Gestalt
    Image Tryzscatzmel Ry - Gnome Alchemist
    Image Image
    Image

    User avatar
    Duniagdra
    Divine Rank 21
    Divine Rank 21
    Posts: 6880
    Joined: Sat Dec 29, 2007 5:17 pm
    Location: Newark, New Jersey, USA
    Contact:

    Re: Reporting code (v1.20)

    Post by Duniagdra » Mon Jul 26, 2010 10:58 am

    This is the code from the Text Box:

    Code: Select all

    "
    === Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%) ===
    
    === Rise of the Kobold King; Below The Monastery ===
    
    === Gelatinous Cube ===
        - Full Plate Armor [Mithral] (5,250gp)
        - Battleaxe [+1] (1,155gp)
    Generated by the Loot Divider (http://LootDivider.com), Version 1.20"						
    						
    						
    						
    						
    
    And its output:
    "
    === Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%) ===

    === Rise of the Kobold King; Below The Monastery ===

    === Gelatinous Cube ===
    - Full Plate Armor [Mithral] (5,250gp)
    - Battleaxe [+1] (1,155gp)
    Generated by the Loot Divider (http://LootDivider.com), Version 1.20"




    Still the same quotes and spaces, but neither reproduce what you get.
    Image Marcus Tilsworth - Human Sorcerer
    Image Ulyuk Bok - Elan Gestalt
    Image Tryzscatzmel Ry - Gnome Alchemist
    Image Image
    Image

    User avatar
    patransom
    Divine Rank 1
    Divine Rank 1
    Posts: 5887
    Joined: Wed Aug 03, 2005 8:40 pm
    Location: Arlington, Virginia

    Re: Reporting code (v1.20)

    Post by patransom » Mon Jul 26, 2010 11:21 am

    I am copying from the right box.

    After looking at your example, it appears the list and /list codes are missing when there are no headers (e.g., Rise of the Kobold King, Gelatinous Cube) in the list of treasure. Compare:

    Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%)
    Rise of the Kobold King; Below The Monastery
      Gelatinous Cube
      • Full Plate Armor [Mithral] (5,250gp)
      • Battleaxe [+1] (1,155gp)
      Generated by the Loot Divider, Version 1.20

      To

      Loot for each of the 6 players: 1,067 gp, 5 sp (standard rate of 50%)
      [*] Full Plate Armor [Mithral] (5,250gp)
      [*] Battleaxe [+1] (1,155gp)
      Generated by the Loot Divider, Version 1.20

      I'm okay with removing the " and extra space, if there's no way around them. On the other hand, it seems like it should be easy enough to generate the list code without requiring subheaders...
      Image

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Mon Jul 26, 2010 11:30 am

      patransom wrote:On the other hand, it seems like it should be easy enough to generate the list code without requiring subheaders...
      I'll see what I can do.

      For the Extra 'stuff'' that is pasted, that is still a mystery for me... At this time, I do not know why Excel adds it in the Paste...
      admin

      User avatar
      patransom
      Divine Rank 1
      Divine Rank 1
      Posts: 5887
      Joined: Wed Aug 03, 2005 8:40 pm
      Location: Arlington, Virginia

      Re: Reporting code (v1.20)

      Post by patransom » Mon Jul 26, 2010 11:46 am

      I think I know where the extra space comes from: the excel cell you copy from is actually a merge of several cells. When pasting, Excel adds tabs for merged columns and returns for merged rows!

      Code: Select all

      This is some data in a single cell

      Code: Select all

      This is some data in a single cell merged from 4 rows and 4 columns			
      			
      			
      			
      
      The end of the code box above shows that 3 extra lines are being added in the second example. If you mouse over and highlight, you'll see the extra tabs in there too.
      Image

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Mon Jul 26, 2010 11:53 am

      Yes I know where they are from - but not the "why" excel does that... a merging of empty cells should not create spaces... (as far as I would expect!)

      User avatar
      Duniagdra
      Divine Rank 21
      Divine Rank 21
      Posts: 6880
      Joined: Sat Dec 29, 2007 5:17 pm
      Location: Newark, New Jersey, USA
      Contact:

      Re: Reporting code (v1.20)

      Post by Duniagdra » Mon Jul 26, 2010 11:57 am

      Yes, that's right. The LD seems to require headers in order to give the list tags. To do away with the extra space, you'd have to use a single cell, expanded to a reasonable size, to accommodate the data. However, I think cells are limited to the amount of data they can hold, otherwise, there's not choice but to have the merge cells.
      admin wrote:Yes I know where they are from - but not the "why" excel does that... a merging of empty cells should not create spaces... (as far as I would expect!)
      But it does. When I post the experience gained in my games, I have to delete tabs because the character name and the xp are separated by a blank cell. It's not giving a space, it's counting the empty cell as a tab. This is similar to converting text to table and table to text in word.
      Image Marcus Tilsworth - Human Sorcerer
      Image Ulyuk Bok - Elan Gestalt
      Image Tryzscatzmel Ry - Gnome Alchemist
      Image Image
      Image

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Mon Jul 26, 2010 1:23 pm

      Duniagdra wrote:But it does.
      I've known about this since it was created and I didn't find any solution to that. This is also WHY step #4 of the Instruction in the Reporting sheet specifically says:
      4- Clean the Text/Post to remove extra elements/spaces.

      If any of you know how to solve this, then I'd be happy to apply your solution!! (although a VBA solution isn't as useful as a a non-VBA solution, for other Spreadsheet Apps. users)
      Also, please note that the latest version is v1.21 ...

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Mon Jul 26, 2010 2:13 pm

      admin wrote:
      Duniagdra wrote:But it does.
      I've known about this since it was created and I didn't find any solution to that. This is also WHY step #4 of the Instruction in the Reporting sheet specifically says:
      4- Clean the Text/Post to remove extra elements/spaces.

      If any of you know how to solve this, then I'd be happy to apply your solution!! (although a VBA solution isn't as useful as a a non-VBA solution, for other Spreadsheet Apps. users)
      Also, please note that the latest version is v1.21 ...
      hmm perhaps if I apply the TRIM() method, it would clean it up a bit!!
      I'll try.

      User avatar
      patransom
      Divine Rank 1
      Divine Rank 1
      Posts: 5887
      Joined: Wed Aug 03, 2005 8:40 pm
      Location: Arlington, Virginia

      Re: Reporting code (v1.20)

      Post by patransom » Mon Jul 26, 2010 2:37 pm

      I don't think TRIM will work, since I suspect the problem is embedded in Windows cut and paste feature and not a function of the information calculated by formula in Excel...

      However, a solution for the spacing issue would be to reformat the page like the example attached. I am still using merged columns, but only one row per cell, because the tabs generally don't require cleanup, only the spacing.

      I realize that this layout for the page is not as pretty or efficient as it used to be. However, the purpose of this page is primarily to be useful for cut and paste, not to fit on a page for printing or display information efficiently. Therefore, I think the change would be worth it.

      Just a suggestion. The missing list code when not using headers bothers me much more than the extra spaces.
      Attachments
      Reporting Example.xls
      (27 KiB) Downloaded 303 times
      Image

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Mon Jul 26, 2010 3:26 pm

      patransom wrote:I don't think TRIM will work, since I suspect the problem is embedded in Windows cut and paste feature and not a function of the information calculated by formula in Excel...

      However, a solution for the spacing issue would be to reformat the page like the example attached. I am still using merged columns, but only one row per cell, because the tabs generally don't require cleanup, only the spacing.

      I realize that this layout for the page is not as pretty or efficient as it used to be. However, the purpose of this page is primarily to be useful for cut and paste, not to fit on a page for printing or display information efficiently. Therefore, I think the change would be worth it.
      Ah indeed: If I use only one cell, the result paste does not have all those empty spaces/tabs! I've fixed it for the next update.
      patransom wrote:Just a suggestion. The missing list code when not using headers bothers me much more than the extra spaces.
      It is not missing as it was not intended to use 'headerless' (like you use it). However, I will check to see what needs to be done so I can add it for you.

      User avatar
      Duniagdra
      Divine Rank 21
      Divine Rank 21
      Posts: 6880
      Joined: Sat Dec 29, 2007 5:17 pm
      Location: Newark, New Jersey, USA
      Contact:

      Re: Reporting code (v1.20)

      Post by Duniagdra » Mon Jul 26, 2010 9:51 pm

      I'm not seeing why this is such an issue that it requires redesigning the report sheet. And it's not spaces, it's tabs that are being left. Spaces have nothing to do with this. So what if there's just a little clean up to do.
      Image Marcus Tilsworth - Human Sorcerer
      Image Ulyuk Bok - Elan Gestalt
      Image Tryzscatzmel Ry - Gnome Alchemist
      Image Image
      Image

      User avatar
      admin
      -={ CREATOR }=-
      -={ CREATOR }=-
      Posts: 13523
      Joined: Wed May 25, 2005 5:51 pm
      Location: Canada
      Contact:

      Re: Reporting code (v1.20)

      Post by admin » Tue Aug 03, 2010 1:11 pm

      patransom wrote:I'm okay with removing the " and extra space, if there's no way around them.
      There are not present in the Loot Divider - they seem to appear on the pasting operation (perhaps that is window's way to 'know' the content of the buffer is text!?). In any case, I can't do anything about those (at far as i can see)
      patransom wrote:On the other hand, it seems like it should be easy enough to generate the list code without requiring subheaders...
      Fixed for the next update!
      I also used the single cell approach, which reduces the number of 'empty' space added in the paste.

      admin

      Post Reply

      Return to “Bug Report”