rogar308
 member, 334 posts
 Gaming is good!
 Got RPOL in my soul
Mon 6 May 2013
at 18:46
Re: Easy Tables and Grids.
I believe I understand what you are getting at just though I'm not sure why you want it. Personally, I don't think I have a need for it but I also understand that there may be others that do since many of us use the site somewhat differently and that is all well and good. For my use though, I'd like just a simple '|' delimited table that doesn't have a fixed width. I suppose anything in addition to that would be a bonus.
jmkool
 member, 257 posts
 aka'd as The Kool
Mon 6 May 2013
at 18:51
Re: Easy Tables and Grids.
I'm not saying we need it.  To me, it's more intuitive than the percentage method, and I'd find occasion to use it, but no complaints if it gets shot down.  I'm making a proposal, and I'm interested to see who likes it.
jase
 admin, 3088 posts
 Cogito, ergo procuro.
 Carpe stultus!
Tue 7 May 2013
at 02:24
Re: Easy Tables and Grids.
I still think setting individual widths, with something like matthewfenn's example, would be far more flexible and easier to use.

As for that example, it'll be problematic if you want to set spanning (after the %).  I think just "50%" would be easier, or ".50%" if it's after a span amount (span afterwards would just be "50%2.2").
jase
 admin, 3089 posts
 Cogito, ergo procuro.
 Carpe stultus!
Tue 7 May 2013
at 17:23
Re: Easy Tables and Grids.
| Header 1.1      | Header 1.2  | Header 1.3   |10% 1.4 |50%
|-------------------------------------------------------|
|50%>Header 2.1   |25% Cell 2.2 |^Cell 2.3     |
|10%>2.3 Cell 3.1               | Cell 3.3     |< 3.4   |
                                |1.3 Cell\n4.3 |^ 4.4   |
                                               |
| 6.1             | 6.2                        | 6.4



Header 1.1Header 1.2Header 1.31.4
Header 2.1Cell 2.2Cell 2.3 
Cell 3.1Cell 3.33.4
Cell
4.3
4.4
 
6.16.26.4


I've now made it far more flexible with the formatting codes, though it's no longer as finicky as to what it'll gobble up.  It'll grab any combination of the alignment, colspan, rowspan and width codes and make what it can out of them.  The codes will be considered finished on either a space, or at the end of the =><^ options (or after it's grabbed about 15 characters).

So valid options are something like:
  • 50%>2.2 (trailing space compulsory)
  • >2.2.50% (trailing space compulsory)
  • 2.2>50% (trailing space compulsory)
  • 2.2.50%> (trailing space optional)
  • >2.2=50% (trailing space compulsory) (right aligned, 2 colspan, 2 rowspan, header, 50% width)
  • 2.2>50%= (trailing space optional)

Any attempt to set the width of a column that's already had it's width set will be ignored (cell 3.1 above has a 10% width, but this is ignored as 2.1 already set the width of column 1 to 50%).  Cells with a colspan are an exception to this, I'm not going to go so far as to check that the colspan=2 for cols 1 and 2 is less than colspan=3 for cols 1, 2 and 3.

Colspan, rowspan and width must all be one or two digits.  So no colspan=100 or cell width=100%.  Valued of 0 are also ignored.

If, for some reason, your cell data is going to be something like <<<50%>>> or ===2.2=== then put a space before the text, which (as previously mentioned) I'd suggest you get into the habit of anyway.
jmkool
 member, 258 posts
 aka'd as The Kool
Wed 8 May 2013
at 03:09
Re: Easy Tables and Grids.
*nod nod*

I may come to agree that this is better than my suggestion.  Looks good.
matthewfenn
 member, 310 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Wed 8 May 2013
at 18:50
Re: Easy Tables and Grids.
Superb!

And just to refresh my MTG two-headed giant example again:

LIFE: 57
CRMNLSTGRANT
C.HAND: 2Grant Hand 4
C.DECK: 39 (60 card deck)Grant DECK 39 (60 card deck)
BATTLEFIELD:
Land
(-)Piranha Marsh (B)
(-)Swamp (B)
(-)Crypt of Agadeem (B)(see link)
[http://magiccards.info/zen/en/212.html
Creatures
War-spike changeling (3/3,changeling)(R:1st strike)(runed halo)
[http://magiccards.info/mt/en/112.html]
Child of Night (2/1, lifelink)
[http://magiccards.info/m10/en/88.html]
Anowon, the Ruin Sage (4/3)  on our upkeep, each player sacs a nonvampire)
[http://magiccards.info/wwk/en/49.html]
Vampire Nighthawk (10/11, flying,deathtouch,lifelink)[8](runed halo)
[http://magiccards.info/zen/en/116.html] (blade of bloodchief)
t-Kalitas, Bloodchief of Ghet (5/5)(BBB,tap: destroy creature, see link)
[http://magiccards.info/zen/en/99.html]
Vampire Aristocrat (6/6)(sac creature get +2/+2 for turn)[4](blade of bloodchief)
[http://magiccards.info/m10/en/117.html]
Black Vampire Creature Token (2/4)
Black Vampire Creature Token (1/1)

Yup, that is great!

So - will it have to wait till the next general release to make it available elsewhere?  :-)
jase
 admin, 3093 posts
 Cogito, ergo procuro.
 Carpe stultus!
Thu 9 May 2013
at 16:38
Re: Easy Tables and Grids.
Another addition:  We can now set the alignment of a column with the divider row (the one with all the dashes).  If you don't want the bolded/emphasised header row then just start the table with the divider row (even though it's then no longer actually dividing anything).

| Header 1.1      | Header 1.2 | Header 1.3   | 1.4  |50%
|<50%-------------|--------25%>|-----^--------|10%---|
|Header 2.1       | Cell 2.2   |<Cell 2.3     |
|2.3 Cell 3.1                  | Cell 3.3     |< 3.4 |
                               |1.3 Cell\n4.3 |^ 4.4 |
                                              |
| 6.1             | 6.2                       | 6.4



Header 1.1Header 1.2Header 1.31.4
Header 2.1Cell 2.2Cell 2.3 
Cell 3.1Cell 3.33.4
Cell
4.3
4.4
 
6.16.26.4

Note that when you're doing column span, the alignment might not turn up how you expect it (depending upon whether you focus on where the column starts or where it finishes).  You may want/expect cell 3.1 to be right aligned, but it starts at column 1, so it gets the alignment from there.  You can override the alignment of individual cells (see cell 2.3 as an example).

Widths can also be set with the divider row.  The divider row can only have pipes (|), dashes and the alignment codes and width (which means even spaces aren't allowed).  It doesn't actually matter whre you put the codes in between the pipes, as illustrated in the example.

Unless their alignment is set within the cell or via the whole column, table data (td) are left aligned, table headers (th) are centre aligned.  Not sure if that's how it should be by default..?

I think I should stop fiddling with this now, it's getting to be a massive routine.
rogar308
 member, 340 posts
 Gaming is good!
 Got RPOL in my soul
Thu 9 May 2013
at 17:05
Re: Easy Tables and Grids.
Well how about using the 'dice roller' to generate your tables? So you could have 2d4 be like 2 rows of 4 columns each. Maybe even 1d5+1d3 for 1 row of 5 columns followed by 1 row of 3 columns. I'd save this for next April 1st but I'm sure it will be long gone from my memory by then.
matthewfenn
 member, 313 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Fri 10 May 2013
at 06:46
Re: Easy Tables and Grids.
Confess I'm not sure what rogar is on about.

Another thought Jase,  how about something to set vertical alignment, especially in those cells that span rows?
Skald
 moderator, 419 posts
 Whatever it is,
 I'm against it
Fri 10 May 2013
at 06:55
Re: Easy Tables and Grids.
rogar's just joking.  I was about to suggest something similar with an end game of using Easy Grid as a random dungeon generator.  <evil grin>

On a more serious note, it'd also be nice to be able to shade individual cells (same colour as the header, let's not get carried away here) ... perhaps # as the tag ?
matthewfenn
 member, 315 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Fri 10 May 2013
at 08:40
Re: Easy Tables and Grids.
Well, easy enough to shade a specific square with an "=", but not so easy to always get the code to display exactly the table you expect...  I almost got the table I want, but it's added a little empty nub sticking out on the right hand side that I can't get rid of!

A1B1C1D1
ABC2D2
3
4
A3BC3
4
BCD5

Incidentally Jase, the [Code][/Code] tags don't seem to work when put around the table code here...
rogar308
 member, 342 posts
 Gaming is good!
 Got RPOL in my soul
Fri 10 May 2013
at 13:19
Re: Easy Tables and Grids.
Wow, table art! Kewl. That's a mighty nice lookin' battery you got there. Maybe set up another thread for table art competition?
jase
 admin, 3094 posts
 Cogito, ergo procuro.
 Carpe stultus!
Fri 10 May 2013
at 15:55
Re: Easy Tables and Grids.
Fixed the incorrect tallying of columns, shouldn't get extra cells on the end of rows now.

Code doesn't stop the easy tables or grids.
matthewfenn
 member, 316 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Fri 10 May 2013
at 16:04
Re: Easy Tables and Grids.
Perfect!
Utsukushi
 member, 1218 posts
 I should really stay out
 of this, I know...but...
Fri 10 May 2013
at 16:29
Re: Easy Tables and Grids.
matthewfenn:
Incidentally Jase, the [Code][/Code] tags don't seem to work when put around the table code here...

But the |'s have to be the beginning of the line, don't they?  So you can still show people cool new tricks with some random text first; like,

1 |A1|B1|
2 |A2|B2|
3 |A3|B3|
 Creates,
A1B1
A2B2
A3B3

(Though since RuBB collapses empty spaces, you can't just put a space in front of the |s.)
Zag24
 member, 585 posts
Fri 10 May 2013
at 17:45
Re: Easy Tables and Grids.
Checking on special types
 BoldItalicUnder-lineStrike-throughsupsubsmalllarge
Bold text text text text text text text text
Italic text text text text text text text text
Under-linetext text text text text text text text
Strike-throughtext text text text text text text text
sup text text text text text text text text
sub text text text text text text text text
small text text text text text text text text
large text text text text text text text text

Cool!!



BTW, I originally had this, and it took me a while to figure out why it did not make the line with my headings into a header line.  I guess the line with all dashes has to be the second one for that to work.

|=9 Checking on special types |
| Bold | Italic | Under-line | Strike-through | sup | sub | small | large |
|-----------------------|




What if I try to put some really awkward stuff in a table?
quote:
This is a quote.

Spoiler text: (Highlight or hover over the text to view)
This is spoilered.
Impressive!
As always, jase, You da man!

This message was last edited by the user at 17:48, Fri 10 May 2013.

jmkool
 member, 263 posts
 aka'd as The Kool
Sat 11 May 2013
at 02:58
Re: Easy Tables and Grids.
The code tags also work properly within a table, as does coloring and font.  If you have too many or too few cells in a row, the cells will stick out/in.  Yeah, I tested this stuff too, as well as the grids.  I found that the code can be shorthanded quite nicely, as

* +--+
* |=X|O|X|
* |X|=X|O|
* |O|O|=X|
* +--+

is all you need to show

XOX
XXO
OOX

Zag24
 member, 586 posts
Sat 11 May 2013
at 13:03
Re: Easy Tables and Grids.
Hi jase,

One quick suggestion:

As I mentioned above, you already have this:
| Bold | Italic | Under-line | Strike-through | sup | sub | small | large |
|-----------------------|

As a shortcut for this, but only if they are the first two lines:
|= Bold |= Italic |= Under-line |= Strike-through |= sup |= sub |= small |= large |

How about also this for the same thing?  (That is, it's a shortcut for the above, but it works anywhere.)
|== Bold | Italic | Under-line | Strike-through | sup | sub | small | large |

Also, I have meant to comment for a while, but it's even more evident here -- I totally love the way preview works, now.  It is incredibly helpful when you are mucking about with something like this.

Finally, for Jhael:  Get ready!  Once these new tables go live, expect a bunch of new character sheet templates using them.  I'm very much looking forward to character sheets that aren't lame, fixed-text-tabular, 1980's-looking pages.

This message was last edited by the user at 13:08, Sat 11 May 2013.

jase
 admin, 3095 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 12 May 2013
at 03:37
Re: Easy Tables and Grids.
Zag24:
I guess the line with all dashes has to be the second one for that to work.

Yep.  Table's generally only have one header (<thead>) row.

"==" is in, but actually means "rest of the row", not "the entire row".

"#" should also now give you the cell shading, but without the bold.  It is still, however, a "th" element, so it'll be centre aligned whereas normal "td" elements are left aligned.  Not sure about it being the hash symbol though, that might be used a bit in cells as text?  If someone uses "|#2" in a cell (without spacing) then it'll pick up the #.

"|# 1 | 2 |== 3 | 4" (plus another line with a single pipe) comes out as:

# 1234

Skald
 moderator, 420 posts
 Whatever it is,
 I'm against it
Sun 12 May 2013
at 06:13
Re: Easy Tables and Grids.
"lame", Zag24 ?  AH, you mean you prefer style over substance ... got it ! <evil grin>

Nah, seriously, as a GM I find fixed text character sheets far easier to update and manage, and they have the advantage that they look the same here in RPoL as they do in the .txt file I store offline. Additionally, since I have such familiarity with the format and there's been little variation between various editions or systems with the fixed text character sheets, when I'm looking at my own characters' sheets as a player myself I can find things quickly and easily, without having to change mental gears to adapt.  After all, I game for the role-playing, not to crunch numbers.  But if others prefer to work with sheets that have much fancier formatting, then good luck to them. :>

My interest in easy grids is not for use in character sheets, but so I can produce very quick maps on the fly - shading cells to represent solid earth/stone/walls etc ie revealing the outlines of rooms and corridors.

Thanks for the # tag, jase (AND wholeheartedly echoing Zag24's lavish praise of preview so I could test it all out before I posted) ... but it doesn't seem to be working for me.  :<

From your notes, I thought it might be because I didn't put it on the first (header) line, in which case I was going to ask could it be extended to the whole table, not just the header, but when I tried the header, that didn't happen either.

# 123
4# 56
789

Keyed as:

+---+---+---+
|# 1 | 2 | 3 |
+---+---+---+
| 4 |# 5 | 6 |
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+


Soo ... what arcane gesture did I miss ? ;>

Not hung up on the #, so please feel free to substitute anything you like - I picked # cos it looked like quick hand drawn shading ... and to be honest, there weren't many other free keys left !
matthewfenn
 member, 317 posts
 www.nj-pbem.com
 Northern Journey PBeM DM
Sun 12 May 2013
at 08:50
Re: Easy Tables and Grids.
i guess he has only coded it for the tables, not the grids...

works in this table
1# 234

jase
 admin, 3097 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 12 May 2013
at 13:46
Re: Easy Tables and Grids.
Yes, thought you were talking about tables.
Skald
 moderator, 421 posts
 Whatever it is,
 I'm against it
Sun 12 May 2013
at 13:49
Re: Easy Tables and Grids.
Sorry ... yes, I was after the shading functionality for grids.  Pretty please ? :>
jase
 admin, 3098 posts
 Cogito, ergo procuro.
 Carpe stultus!
Sun 12 May 2013
at 14:09
Re: Easy Tables and Grids.
In reply to Skald (msg # 110):

Have you looked up at your previous post?  (c;
Skald
 moderator, 422 posts
 Whatever it is,
 I'm against it
Sun 12 May 2013
at 14:56
Re: Easy Tables and Grids.
Aha !  Thank ye kindly. :>

Gives us quick maps:

          
          
          
          
          
          
          
          
          
          

And instant crossword (or similar word puzzles):

1 2 3 4 5 6 7
      8      
9            
    10    11 12 
13       14    
     15       
1617 1819   20 21 22
   23  24      
25 26     27    
28            
        29    
30            
      31      

Youre a cheenius, mathter.  You've created a monthter ! ;>