Click to open network menu
Join or Log In
Mobafire logo

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

Create an MFN Account






Or

's Forum Avatar

Programmatical Theorycrafting Framework [WIP]

Creator: nand January 9, 2011 8:38pm
1 2
nand
<Member>
nand's Forum Avatar
Posts:
346
Joined:
Jan 4th, 2011
Permalink | Quote | PM | +Rep January 9, 2011 8:38pm | Report
Just posting a quick info here so I can see how much interest this project would generate.

Basically, I'm writing a framework that will allow for the creation, simulation and analysis of any possible item build, scenario or situation. The entire database will be external/dynamic and file-based, allowing for the addition of new items, spells, consumables or champions (even ones not currently in the game), as well as possible synchronization with an online source to keep it up-to-date after patches.

I'm planning to use it for a general-purpose all-inclusive battle simulator in the same style as leaguecraft.com's, but more complete and with the possibility to test damage on another champion.

Would anybody here be interested in the project, or maybe even its source code / progress updates? I'm planning to write it in C# and it will be FOSS.

The project is currently in the initial planning / layout phase, and I'm working on a system to uniquely serialize item/spell effects: http://nand.pastebin.com/AuHuQJc4
caucheka
<Veteran>
caucheka's Forum Avatar
Show more awards
Posts:
8290
Joined:
May 18th, 2010
Permalink | Quote | PM | +Rep January 9, 2011 9:14pm | Report
holy **** that would take so much effort. hell if i knew a lot more about programming i would offer to help.
I like things that make me feel stupid. - Ken Levine
Searz
<Ancient Member>
Searz's Forum Avatar
Show more awards
Posts:
13418
Joined:
Jun 6th, 2010
Permalink | Quote | PM | +Rep January 10, 2011 2:19am | Report
That would be awesome. Too bad I've only got basic knowledge of C#. I might be able to help if you have any questions about the game mechanics though.
"Doing something, almost being done, then parents come in and don't let you finish.
Yes, I had a rough childhood." - devdevil
nand
<Member>
nand's Forum Avatar
Posts:
346
Joined:
Jan 4th, 2011
Permalink | Quote | PM | +Rep January 10, 2011 3:08am | Report
The bulk of the work will probably be figuring out every champion's raw attack speed, armor, armor/lvl, MR, MR/lvl and movement speed values.

Also difficult will be stuff like Malzahar's voidling, Heimerdinger's turret etc.
They can't be serialized in terms of regular skill effects. I'm thinking about whether I should simply code them as a regular targeted DoT, since in terms of damage calculation it's the exact same.

Another interesting thing to program will be the universal formula evaluator, which will have to take into account expressions such as $AD or $MaxHP, or $StackCount for buffs.

(I'm thinking of Twitch's spell system for example: His passive would be an On-Hit Effect that applies a stack-limited Buff that itself has a DoT * $StackCount component using a certain ID. His poison skill would remove all Buffs with that ID and apply a certain amount of damage based on its $StackCount. I'm wondering whether to implement functions as well, for example Sqrt() or Round(), that way I could use a function like StackCount(*id of buff here*) to get the amount of a certain stack.)

Edit: I have a better idea. Instead of adding functions, I'll simply use a unique $StackCount variable for every buff ID, for example $StackCount51 would get the count of the buff with the unique ID 51.
cruise#29382
<Member>
cruise#29382's Forum Avatar
Posts:
8
Joined:
Dec 20th, 2010
Permalink | Quote | PM | +Rep January 10, 2011 5:28am | Report
Was thinking about doing a basic form of this myself. I'll keep an eye on the project, and I'll chip in where necessary. F'rinstance, surely an array for StackCount, with the index being the ID makes the most sense?
[ cruise / casual-tempest.net / transference.org / wytedragon.net / quantam sufficit ]
nand
<Member>
nand's Forum Avatar
Posts:
346
Joined:
Jan 4th, 2011
Permalink | Quote | PM | +Rep January 10, 2011 8:24am | Report
Quoted:

Was thinking about doing a basic form of this myself. I'll keep an eye on the project, and I'll chip in where necessary. F'rinstance, surely an array for StackCount, with the index being the ID makes the most sense?


I was thinking the same, except that you'd want to use a hash instead of an array since it's not guaranteed that IDs are in linear order, or even 0 based (for example, you could have all buffs offset by 10000). I'll upload the source for you whenever I make a major addition if you want to have a look at it / see if you can contribute.

The issue mentioned above is just that there's no system to access collections in the basic formula language I had been thinking about, only a way to access individual variables. I could work around this by simply assigning the real value of StackCount[1234] to the script variable $StackCount1234 without the StackCount1234 variable actually existing - that way I have the cleanest possible solution without implementing unnecessary complications for a single purpose.
Searz
<Ancient Member>
Searz's Forum Avatar
Show more awards
Posts:
13418
Joined:
Jun 6th, 2010
Permalink | Quote | PM | +Rep January 10, 2011 8:36am | Report
nand wrote:

The bulk of the work will probably be figuring out every champion's raw attack speed, armor, armor/lvl, MR, MR/lvl and movement speed values.

That should be really easy. All the numbers are regularly updated on the lol wikia.

Quoted:
Also difficult will be stuff like Malzahar's voidling, Heimerdinger's turret etc.
They can't be serialized in terms of regular skill effects. I'm thinking about whether I should simply code them as a regular targeted DoT, since in terms of damage calculation it's the exact same.

That should be the correct way to go about it.
I'm a strong independent black mage who don't need no mana.
nand
<Member>
nand's Forum Avatar
Posts:
346
Joined:
Jan 4th, 2011
Permalink | Quote | PM | +Rep January 10, 2011 9:35am | Report
Searz wrote:
That should be really easy. All the numbers are regularly updated on the lol wikia.

Oh neat, I never noticed that before.
Searz
<Ancient Member>
Searz's Forum Avatar
Show more awards
Posts:
13418
Joined:
Jun 6th, 2010
Permalink | Quote | PM | +Rep January 11, 2011 1:14am | Report
Here's a link, if you haven't found it yet.
""Toshabi took thy **** and strucketh Hotshot in his face 'thou art no god'" Toshabi 3:16" - Toshabi

"And then, TheJohn said something so Brazilian that it made all the Brazilians in Brazil turn to look at him" - Toshabi

"abloobloo ur triggering me" - Toshabi
MedivacMarauder
<Member>
MedivacMarauder's Forum Avatar
Posts:
11
Joined:
Jan 11th, 2011
Permalink | Quote | PM | +Rep January 11, 2011 12:06pm | Report
Hey Nand

Sounds like an interesting project. I do agree with cauchecka though, it will pobably take some time and effort to create a complete simulator.

If you have any formal requirements specification or class diagrams for the design of the application and wish to share them with us, let me know where we can have a look at them.

I am not really interested in the mathematical formulas or even algorithms, but would like to see the high level view of your framework if you wish to go the formal development route.

Good luck and enjoy!
A baker by profession....
1 2

You need to log in before commenting.

League of Legends Champions:

Teamfight Tactics Guide