| Welcome to The Sundered Mare. We hope you enjoy your visit. You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you're already a member please log in to your account to access all of our features: |
| Coding for the Campaign; How to use BBCode to post in the campaign | |
|---|---|
| Tweet Topic Started: Jul 6 2013, 03:53 AM (42 Views) | |
| tenlaven | Jul 6 2013, 03:53 AM Post #1 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Crash course in replying and using BBCode for the Campaign Forum: If you don't want to always use Full Reply, you can still fast reply and color your posts using a very simple BBCode:
The key to making sure this works is to always close your code with slash and the name of the code, as seen above. It doesn't even have to be on the same line as your sentence. This works as well:
Copy pasted, code in action This text will be blue if you use it in a fast reply. You may have noticed I just used the word "blue" for "color=blue". I could use any color name, "red", "green", or "yellow", and as you can see, they work just as easily. So, now that you know how to color your text for a fast reply, this is where things get more complicated... Using color names works just fine for code, but if you're like me (and you're probably not because I'm insane), you hate when things aren't uniform when you want them to be. The problem with using "blue", "red", "green", or "yellow", is that they don't exactly match the colors from the dropdown menu: blue, red, green, and yellow/gold Here's what the code looks like for those:
Notice the hashtags or pound signs followed by a mess of letters and numbers? For those who don't know, these are "hex codes" and they're actually used a lot by people like artists, and web developers. In fact, all text anywhere online is coded to be colored a certain way, even this text has its own hex code color. I'm mostly using this to show you what the code looks like if you want to tinker with it yourself, but also for anyone who's like me (see above), and wants to use the board's hex code colors for posting. Just for clarification, I am perfectly okay with my players using color names, instead of the hex codes in the fast reply. If it starts driving me (more) insane, I can always edit your posts myself. I hope you enjoyed "Coding With Pat" stay tuned for more! An extra tidbit: closing code only requires you to use / and the type of code you're closing, like "color", which would be:
So let's say you wanted to put in a hyperlink to Google:
I won't get too much into how this works, but the key is that when you start the code you're using "URL" then using "/URL" to close the code, encapsulating the text inside and converting it into a clickable link. Everything that comes after the equals sign in the brackets is only a parameter that defines what the URL is, it doesn't get referred to again in this case because it's not part of the actual code, just some extra data. So color? /color code? /code URL? /URL Hope this clears things up. |
![]() |
|
| tenlaven | Jul 6 2013, 04:26 AM Post #2 |
|
Administrator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
We're back for more "Coding With Pat"! Today we'll be learning how to code die rolls into our posts. I was able to find some script for the board that allows you to actually post a die roll. To do this we'll use:
See below... This is actually some pretty powerful code, because not only will it allow you to roll a die with any number of sides, but also change the number of dice, and add modifiers, like +5 to the totals. Here's what some of that looks like:
I had to change the square brackets ([) at the beginning to curly braces ({) because the code will try to run even in a code box (it's not supposed to, keep this in mind) and will return an error: You appear to have a malformed roll. Please correct it and try again. Be aware that all BBCode uses square brackets, not curly braces, so be sure to swap them back if you copy/paste. That's a lot of functionality, and there could be more, I haven't experimented much with it yet. So the parameters for this code looks like this:
See above... The only parameters required are the number of dice (num), a 'd', and the number of sides (sides). The extra (extra) is always optional. So what does it look like when you actually post a roll? Well here you go: I should mention that the code doesn't execute until you actually hit the post button, so you won't see what your results are until you see your post in the topic. Once you've posted, the code creates a neat little link that opens a small window detailing what you've rolled, and how it's calculated the results. This makes is incredibly easy to see what people have rolled for different situations. So here's the nice thing for DM's such as myself. The rolls cannot be edited in any way, once they've been posted. If you try to it will actually pop up a box that tells you not to cheat (not that anyone would right?) That's all for this episode of "Coding With Pat", see you next time! |
![]() |
|
| 1 user reading this topic (1 Guest and 0 Anonymous) | |
| « Previous Topic · General Discussion · Next Topic » |






![]](http://z5.ifrm.com/static/1/pip_r.png)



8:42 AM Jul 11