A Somewhat Extensive Guide to BBCodes
Forum Index > PokéFarm > Guides >
QUOTE originally posted by omg
im sorry if this has been asked before, but i was wondering if theres any way to round the results of the math bbcode, just to the nearest whole number?
or is there a way to even just hide the numbers after a decimal altogether, and just show the whole number?
its okay if not, its easy to just make do with what we've got now ofc ^^ was just curious if anyone had pointers in how i could play with that!!
[math]3.55/100[/math]
which results in: 0.04
Then to restore it back to its original state, we reverse the division by multiplying by 100. We have to do this in a separate math block, because it does not round until it calculates the full result of the math block.
Our end expression is:
[math][math]3.55/100[/math]*100[/math]
which results in: 4
So to round any expression to the nearest whole number, we can use:
[math][math](any math expression)/100[/math]*100[/math]
If I forget to respond to a post or trade please PM me! I may have forgotten to subscribe.
Avatar from Pokémon Showdown April Fools Day sprites, recolored by me.
ohhh that's brilliant! thank you!!
another question, and its totally okay if this one isn't doable, but is it possible to prevent it from ever rounding up, essentially ignoring the decimal? but still showing a whole number :o
QUOTE originally posted by omg
im sorry if this has been asked before, but i was wondering if theres any way to round the results of the math bbcode, just to the nearest whole number?
or is there a way to even just hide the numbers after a decimal altogether, and just show the whole number?
its okay if not, its easy to just make do with what we've got now ofc ^^ was just curious if anyone had pointers in how i could play with that!!
it seems to have slipped my mind -- can you grey out items when using the item= code? if so, how would i go about that?
ANGEL // FURINA
SYSTEM // ADULT // SHE/THEY
HIIII :P
Score: 2961
You can gray out almost any image with the grayscale filter:
[css="filter: grayscale(1);"][pkmn=Porygon2] [item=Up-Grade][/css]
The CSS tag creates a new line - you can add "display: inline;" or "display: inline-block;" to make it share the line
Are FontAwesome icons usable on the site or no? I can't seem to get anything to work so I'm assuming not, but I figured I'd double check in case I was missing something!
Now that's an interesting question... I'm going with v4 via CDN because things have gotten more complex in FontAwesome since then. But this was not exactly a beginner-friendly process, and is not one I'm confident I could explain well. (the biggest thing, is that I don't think I can @import cross-site CSS, and so I'm only including a portion of the full CSS file)
But there we go. So at minimum what you need is the entire font-face definition shown below, the entire .fa block, and then the specific icon block for each icon (in this case, just fa-paw). The icon-specific blocks can be found in the CDN's un-minimized CSS file. There's also like sizing and positioning blocks in there you could include, if you wanted - any time you added a "fa-" class to your icon [sc], you'd find its matching block in the CSS file and include that too.
I suppppose you could dump that entire CSS file, plus the font URL mods I made here, into a skin file, and then import that skin file each time you want to use the icons. I don't really love that, idk if it's "proper", but I guess it would work? As long as @import keeps working that is.
Code
[sc="fa fa-paw"][/sc]
[style]
@font-face {
font-family: 'FontAwesome';
src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.eot');
src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff2') format('woff2'), url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.woff') format('woff'), url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.ttf') format('truetype'), url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/fonts/fontawesome-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.fa-paw:before {
content: "\f1b0";
}
[/style]
Is there another way to keep track of your chain how many eggs you've hatched how many shiny how many albino and melanistic I've been using the one below but I have to put an albino and melanistic in manually is there one that just does it automatically but still looks pleasing to the eye?
1020
[inventory=shinychain][img]https://pfq-static.com/img/pkmn/egg.png[/img][inventory=shinyshiny][img]https://pfq-static.com/img/pkmn/shiny.png[/img]0[img]https://pfq-static.com/img/pkmn/albino.png[/img]0[img]https://pfq-static.com/img/pkmn/melanistic.png[/img]
QUOTE originally posted by Shadow vulpix
Is there another way to keep track of your chain how many eggs you've hatched how many shiny how many albino and melanistic I've been using the one below but I have to put an albino and melanistic in manually is there one that just does it automatically but still looks pleasing to the eye?
13501920
[inventory=shinychain][img]https://pfq-static.com/img/pkmn/egg.png[/img][inventory=shinyshiny][img]https://pfq-static.com/img/pkmn/shiny.png[/img]0[img]https://pfq-static.com/img/pkmn/albino.png[/img]0[img]https://pfq-static.com/img/pkmn/melanistic.png[/img]
Ok thanks
Cannot post: Please log in to post