Click to open network menu
Join or Log In
Mobafire logo - Happy Halloween

Join the leading League of Legends community. Create and share Champion Guides and Builds.

Create an MFN Account






Or

Community celebration time! Share a Halloween story or creation to enter our Special Halloween Giveaway! Less than 24 hours remaining. 🎃
's Forum Avatar

Using javascript (or any other coding language)...

Creator: Ekki September 6, 2015 6:51pm
1 2
RottedApples
<Inhouse Addict>
RottedApples's Forum Avatar
Show more awards
Posts:
1779
Joined:
Nov 28th, 2013
Permalink | Quote | PM | +Rep September 7, 2015 2:33pm | Report
Janitsu wrote:
If you want to randomize with BBCode you'll need [randomize][/randomize] and [ri] for each randomize part.


[randomize]
[ri][icon=trinity force size=64]
[ri][icon=infinity edge size=64]
[ri][icon=bloodthirster size=64]
[ri][icon=phantom dancer size=64]
[/randomize]

will yield:





EDIT: Seems like it doesn't work for items, though, I'll copy-paste my signature for more information whether it's a bug with randomizing or with items only



now everyone can use your sig. Kappa

Signature is from Ninja_Trigger's champion mastery thread!
New and slightly improved version is still up to date >HERE!<
Latest Legend
<Member>
Latest Legend's Forum Avatar
Show more awards
Posts:
3040
Joined:
Dec 7th, 2012
Permalink | Quote | PM | +Rep September 7, 2015 2:39pm | Report
Ekki wrote:
I tried nesting randomizers but it seems to generate several bugs, like adding previous [ri] values to the current randomizer, then calling the randomizer again. I doubt I can do most of what I want simply by nesting randomizers, but I guess I can work something off of it.

The idea is generating a different build every time you enter, but not just a random bunch of items. The guide would generate a playable build, which may need a bunch of logic to work :/ I could manually pick most of the options in the random seed, but it may be a lot of work, depending on how intertwined are the items considered "decent" in each case.

Ah, that sounds annoying.

Well, if those bugs wouldn't exist, you could do stuff like:
Code:
[random] /* boots */ [/random] [random] [ri]armor tanky item [random] /* only mr tanky items */ [ri]mr tanky item [random] /* offensive item */ [/random] [/ri] [/random] [/ri] [/random]

In other words, it would be a ****load of nesting, rapidly increasing too. I wouldn't recommend it but this is the only way (except the image generation you managed, and maybe embedded flash (not sure how the embed tag works). If you would want to go this way, I'd advise you write the logic in pseudo and write a tool to convert it to the BBCode (and throw in all the nesting). Lots of work.

I think it's more valuable to just explain how an item build should be built up and writing it in a comprehensible format (English) rather than writing it in BBCode randomizers, forcing the reader to reload a ton of times to get to the bottom of it. :P
********'s a pretty good fertilizer
Ekki
<Veteran>
Ekki's Forum Avatar
Show more awards
Posts:
1091
Joined:
Nov 28th, 2013
Permalink | Quote | PM | +Rep September 8, 2015 2:28am | Report
Ah, that sounds annoying.

Well, if those bugs wouldn't exist, you could do stuff like:
Code:
[random] /* boots */ [/random] [random] [ri]armor tanky item [random] /* only mr tanky items */ [ri]mr tanky item [random] /* offensive item */ [/random] [/ri] [/random] [/ri] [/random]

In other words, it would be a ****load of nesting, rapidly increasing too. I wouldn't recommend it but this is the only way (except the image generation you managed, and maybe embedded flash (not sure how the embed tag works). If you would want to go this way, I'd advise you write the logic in pseudo and write a tool to convert it to the BBCode (and throw in all the nesting). Lots of work.

I think it's more valuable to just explain how an item build should be built up and writing it in a comprehensible format (English) rather than writing it in BBCode randomizers, forcing the reader to reload a ton of times to get to the bottom of it. :P
The idea is to have a "random build following this guide" section, for people to have their lulz. The builds are really varied and can be easily intertwined, that's why I want powerful tools.

If it was for "random AP item+random AD item+etc" I could use parallel randomizers for each of the 6 slots, but unfortunately I can only do that up to some point (e.g. randomize if you go jungle or lane, if each item slot would be an AD, AP or tanky item, which jungle upgrades to get in case you go jungle), but then when choosing the items I doubt even putting all options in each [ri] would suffice.

Do you say I can embed flash? If I can do it I guess that's the way to go. I may need to learn to do it, but I started this thread with the idea of learning a coding language anyways.

I think it's more valuable to just explain how an item build should be built up and writing it in a comprehensible format (English) rather than writing it in BBCode randomizers, forcing the reader to reload a ton of times to get to the bottom of it. :P
I already explained the hows and whys in each of my guides, but I want to add another didactical tool, because I know the amount of people that wants to read through walls of text off the bat is small. This way you'd have to read some summary and the build generator would be enough to start playing. Then if the player wants to expand their knowledge they can read every section as they see fit.

I know there is already a summary, but I'm trying to add another layer to the process (read the summary->see the item build tool->read the full guide).
Latest Legend
<Member>
Latest Legend's Forum Avatar
Show more awards
Posts:
3040
Joined:
Dec 7th, 2012
Permalink | Quote | PM | +Rep September 8, 2015 3:48pm | Report
I understand that parallel would never be enough, that's why I showed the nesting in the example (only the boots are parallel, but I guess even that shouldn't be).

The basic idea would be that every [ri] would have a nested [random] containing [ri]s for the viable options (like: a Frozen Heart [ri] could have a nested [random] with [ri]s for every item except Frozen Heart, so that only one Frozen Heart can ever be in the final product.

Example for a 3-item build: for the first item you can choose either a or b. If you take item a for the first item, the second item should be either a1 or a2. If you choose a1, the final item should be a3, a4 or a5. If you choose a2, the final item must be a6.
Code:
[random] [ri]a [random] [ri]a1 [random] [ri]a3[/ri] [ri]a4[/ri] [ri]a5[/ri] [/random] [/ri] /* end of a1 */ [ri]a2 a6 [/ri] /* end of a2 */ [/random] [/ri] /* end of a */ [ri]b [random] /* etc. */ [/random] [/ri] /* end of b */ [/random]

So you can go further than 6 parallel randomizers. But, like I said, this gets messy real fast if you're going to write it by hand. And a lot of text. So this is more of a theoretical thingy I guess ^^

Like I said, I'm not sure whether it's possible or not. I know youtube and imgur can be embedded, maybe there are more possibilities. But I don't know.

Ekki wrote:
I already explained the hows and whys in each of my guides, but I want to add another didactical tool, because I know the amount of people that wants to read through walls of text off the bat is small. This way you'd have to read some summary and the build generator would be enough to start playing. Then if the player wants to expand their knowledge they can read every section as they see fit.

I know there is already a summary, but I'm trying to add another layer to the process (read the summary->see the item build tool->read the full guide).
Fair enough. The effort may outweigh the gain though :P
********'s a pretty good fertilizer
Ekki
<Veteran>
Ekki's Forum Avatar
Show more awards
Posts:
1091
Joined:
Nov 28th, 2013
Permalink | Quote | PM | +Rep September 8, 2015 6:59pm | Report
The basic idea would be that every [ri] would have a nested [random] containing [ri]s for the viable options (like: a Frozen Heart [ri] could have a nested [random] with [ri]s for every item except Frozen Heart, so that only one Frozen Heart can ever be in the final product.
For some reason I overlooked this option. Maybe I scrapped it in my mind when I figured nesting doesn't work as intended. I guess I maaaaaaaay be able to do it that way if I made it work. As you say, it would be a lot of monkey labor though :P

To be honest, I like learning programming stuff, so it's not like I would have any problem learning to do it. At least I wouldn't have to manually write every combination after each item for every slot...
1 2

You need to log in before commenting.

League of Legends Champions:

Teamfight Tactics Guide