|
#1
|
||||||
|
||||||
|
Embrodak's Guide to Tables
I could say use the quote function (or put your blue mod hat on) and reverse engineer it like I did.. And I should say that.. But I keep forgetting half of the formatting options so I wanted to put this down for my reference too. I will also put down the steps to organize yourself by using a spreadsheet and the formula you need to make your spreadsheet upto DnDOG code. A big thanks to TH for releasing the code in this version of DnDOG as it is a pre-release of version 4. Several months ago after reverse engineering some of TH's tables I axed him for some explanations of the code which he happily obligged but asked me to keep it on the down low.. Well alot of people are using tables now (I mean I even saw shoes and grave using'em) so I think it is safe to let the cat out of the bag. IN the following posts you will see me using {} around the tags.. That is so you can see what I am writing. Just replace the {} with []. Last edited by Embrodak; 01-30-2009 at 11:36 PM. |
|
#2
|
||||||
|
||||||
|
Basics
OK here are the basics.
__________________You open a table with {table} and close with {/table} Pretty easy so far. Each Row is just a new line, each Column is seperated by the pipe Character "|". That is found on the keyboard above the Backslash "\" A row goes up and down, and Column goes left to right. I am going to take info from the SRD. I am going to create a table from the equipment section. The first Column will be the item. The second Column will be Cost (in GP's) and the third will be Weight. The first row will contain the headers, the second and third (I'm stopping at the second item on the list) will contain the items. {table} Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table}
|
|
#3
|
||||||
|
||||||
|
Cell Padding, Lines, etc.
You saw the table produced above. Their is a problem with reading it.
__________________There is further syntax you can put into the opening of the table For Example {table 3 2 1} Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 3 2 1] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] You can see the only change was the opening Table. Instead of just {table} I put in {table 3 2 1}. The closing syntax is the same {/table}. What the heck does the 3 2 1 mean... {table A B C} The A part is the how thick the line is on the outside. The B part is the padding in the individual cell*. How big the box is around your data. The C Part is the padding between cells*. How much space between the individual cells. It goes from 0 (the smallest) to 9 (the largest). I believe {table} is close to {table 0 0 0}, though it is a bit off. *Cell Definition: In any spreadsheet program such as Excel, each rectangular box is referred to as a cell. A cell is the intersection point of a column and a row. Here are the samples of what I am talking about. {Table}
[table 0 0 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 0 0} [table 1 0 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 5 0 0} [table 5 0 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 9 0 0} [table 9 0 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 1 0} [table 1 1 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 5 0} [table 1 5 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 9 0} [table 1 9 0] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 1 1} [table 1 1 1] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 1 5} [table 1 1 5] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 1 1 9} [table 1 1 9] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] {Table 9 9 9} [table 9 9 9] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] For some reason my personal favorite is 3 2 1 {Table 3 2 1} [table 3 2 1] Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] |
|
#4
|
||||||
|
||||||
|
Row Highlighting
You can highlight a row by inserting the following syntax before your row
__________________#^ Where you replace the # with a Number 1-7. 7 is the default so by leaving it blank it will look like 7. I typically will change the header rows and leave the rest blank. {table 3 2 2} 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 3 2 2] 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] As you can see the table heading is highlighted in a dark green. Well at least from the Lime style. I understand that it may change based on what style you are using. EDIT: Yeah , I looked at it from the parchment style and the colors are way different. [table 2 2 2] Type|space 1^1| 2^2| 3^3| 4^4| 5^5| 6^6| 7^7| Blank| [/table] Last edited by Embrodak; 01-30-2009 at 11:38 PM. |
|
#5
|
||||||
|
||||||
|
Column Spanning
- If the number of columns are different between rows, last columns of shorter rows will get colspan= with needed number
__________________It is perfect for using as a table header {table 3 2 2} 3^Equipment 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 3 2 2] 3^Equipment 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] Note: again only the columns on the right. You can not selectively make the columns in the middle or left Column Span. Column Span Demo {table 1 3 0} 1|2|Text String 16798789789797979799879797979|4|5|6|7 1^~ right with colspan 2^ Blablabla|=center with colspan 3^ 1|2|left with colspan 4^ 1|~center without colspan|3|4|5|6|7 5^ 1|Blablabla|{b}3{/b}|4|5 6^ 1|2|3|4|5|6|7{/table} [table 1 3 0] 1|2|Text String 16798789789797979799879797979|4|5|6|7 1^~ right with colspan 2^ Blablabla|=center with colspan 3^ 1|2|left with colspan 4^ 1|~center without colspan|3|4|5|6|7 5^ 1|Blablabla|3|4|5 6^ 1|2|3|4|5|6|7[/table] Last edited by Embrodak; 01-30-2009 at 11:32 PM. |
|
#6
|
||||||
|
||||||
|
Further Syntax - Justification
If you wish to justify a cell (Center, Left, or Right), you need to put one of the following symbols right before your text.
__________________Center = Right ~ Left "Just leave Blank" {table 2 2 2} 3^Justification. =Center ~Right Left {/table} [table 2 2 2] 3^Justification. =Center ~Right Left [/table] Note, if you are placing highlighting on the cell, you would place it right after the ^ so. 3^=center Continuing on from Column Spacing (above) I like to use it an center my table headings. {table 3 2 2} 3^=Equipment 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 3 2 2] 3^=Equipment 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] Last edited by Embrodak; 01-30-2009 at 11:41 PM. |
|
#7
|
||||||
|
||||||
|
Text Formating
You can format the text, just be aware you need to do it in each individual cell.
__________________You can do Bolds, Italics, Underlines, Fonts, Colors, Strikethroughs etc. {table 3 2 1} 3^Item|Cost|Weight {color=Blue}Backpack (empty)|2 gp|2 lb{/color} {color=Blue}Barrel (empty){/color}|{color=Blue}2 gp{/color}|{color=Blue}30 lb{/color} {/table} [table 3 2 1] 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] You can see the first line had color around the whole thing and you can see it didn't color everything. The second line is all colored.. Last edited by Embrodak; 01-30-2009 at 11:25 PM. |
|
#8
|
||||||
|
||||||
|
Transfering Tables from Excel to DnDOG
Ok Em,
__________________That's good and all, but how do you make your fancy sheets with Excel. Answer: The CONCATENATE Function In Excel, the Concatenate function allows you to join 2 or more strings together. The syntax for the Concatenate function is: Concatenate( text1, text2, ... text_n ) There can be up to 30 strings that are joined together. That works in all version of excel, I only assume in other Spreadsheet programs (Lotus, Open Office) First create your table. I am using the example from above. The Item list from the SRD (just the first two items). ![]() You can see I put a space so I could put the {table 3 2 1} above and the {/table} to close it. I then start the formula. I type =CONCATENATE( 1) I click on cell A2 2) I type ,"|", The Comma tells excel I am going to the next string. the " " tell excel to insert what ever text is between the "". the | is the syntax for DnDOG The last Comma is for telling excel to go to the next string. Before I continue I lighlight ,"|", select Copy. 3) I click on cell B2 4) I paste in what I copied ,"|", 5) I click on C2 For this table that is all on this line. If there were more Columns you would keep going by alternating selecting the cell then pasting in ,"|", 6) You close the formula with the ) 7) You then copy cell E2 down. You should see the data start to populate. 8) I then will do my formatting. In this example I took cell E2 which has the header row. In front of the formula I want to have a 3^ so it will highlight the row in Green. =CONCATENATE(A2,"|",B2,"|",C2) I insert a "3^", the "3^" so it inserts 3^ and the comma so it knows to go to the next string. =CONCATENATE("3^",A2,"|",B2,"|",C2) ![]() You can go and edit other cells like in step 7.. 9) Once done, in excel you highlight from cells E1 to E5 (table to /table) Copy Move to DnDOG and click paste {table 3 2 1} 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 3 2 1] 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] You can get fancy and put totals on the bottoms.. Whatever you copy and paste it will paste the output and not the formula. Also note you could do Coloring, Bolding, etc by entering the data in a cell and just referring to it. In the above I replaced the 3^ with A10. I inserted the color. I could have typed it in to the formula of just referenced the cell ![]() {table 2 2 2} 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb {/table} [table 2 2 2] 3^Item|Cost|Weight Backpack (empty)|2 gp|2 lb Barrel (empty)|2 gp|30 lb [/table] Last edited by Embrodak; 01-30-2009 at 11:21 PM. |
|
#9
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Cool Table Tricks...
I like putting my attack rolls in Table format...
__________________{table 2 2 2} 3^Attack 1|Damage 1 {dice}1d20+16{/dice}|{dice}1d8+11{/dice} 3^Attack 2|Damage 2 {dice}1d20+11{/dice}|{dice}1d8+11{/dice} 3^Attack 3|Damage 3 {dice}1d20+16{/dice}|{dice}1d8+11{/dice} {/table} [table 2 2 2] 3^Attack 1|Damage 1 Dice *
Roll:
Dice *
Roll:
3^Attack 2|Damage 2 Dice *
Roll:
Dice *
Roll:
3^Attack 3|Damage 3 Dice *
Roll:
Dice *
Roll:
[/table] [edit]Do note if you do edit a post with dice tags in a table, it will still say fixed, just not show up in red!! Last edited by Embrodak; 01-30-2009 at 11:23 PM. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
| Thread Tools | |
|
|