International Simulation Football League
TPE Calculation Tool for Stats Writers - Printable Version

+- International Simulation Football League (https://forums.sim-football.com)
+-- Forum: Community (https://forums.sim-football.com/forumdisplay.php?fid=5)
+--- Forum: Media (https://forums.sim-football.com/forumdisplay.php?fid=37)
+---- Forum: Graded Statistical Analysis (https://forums.sim-football.com/forumdisplay.php?fid=153)
+---- Thread: TPE Calculation Tool for Stats Writers (/showthread.php?tid=2175)



TPE Calculation Tool for Stats Writers - Noppadet - 07-14-2017

Well it's not exactly an analysis but I think this fits best here. I made a stat tool I made for anyone that wants to do on the fly TPE calculations.

Link to the tool:
https://jsfiddle.net/Noppadet/9zruhxw5/

Directions:
Just copy and paste in the form on the bottom right like what's in there and hit submit to get a TPE count. This includes your starting build, so subtract that if you just want to see the TPE you've added.

Explanation of the tool:
For testing I used @timeconsumer 's starting TPE calculations per build against the calculator.

This may prove useful if you're in a situation when you're trying to compare total TPE, or even get the total TPE of many single stats quickly (though it's written as such that if you have 2 strength values listed, the last one will be the value used, so something to keep in mind).

Simply paste the contents of the player profile page into the form on the bottom right and hit submit. A window alert will let you know the total TPE. Barring that ensure the format is as follows ": AttributeNameSameAsProfileIEStrength : AttributeValue" All fields are optional. You can use only the fields you want to.

Note that this will take whole real numbers only. You're going to see wonky results if you add in strength as 82 2/10 or 75.4 or something. Just add the 2 from 2/10 to points available if it's necessary for what you're doing.

Feel free to fork and modify as you see fit. All of the separate stats are pretty clearly labelled so you can do more with the tool if you modify the Javascript a bit (i.e. calculations with the attributes instead of TPE counting).

You can subtract the starting build TPE from current TPE to get an accurate measure of total TPE, if updaters and people who approve new players want to use it that way as well.

For example:
[Image: MlBiEp3.png]

This reports starting Power Rush Linebacker TPE as 426, matching timeconsumer's article: http://nsfl.jcink.net/index.php?showtopic=2044

That's my starting archetype.

My current stats (well current from my update page) are:

Remaining TPE: 0
(MAX: 90) Strength: 78
(MAX: 85) Agility: 69
(MAX: 25) Arm: 1
(MAX: 80) Intelligence: 52
(MAX: 25) Throwing Accuracy: 1
(MAX: 95) Tackling: 77
(MAX: 80) Speed: 77
(MAX: 50) Hands: 43
(MAX: 25) Pass Blocking: 7
(MAX: 25) Run Blocking: 7
(MAX: 100) Endurance: 68
(MAX: 25) Kick Power: 1
(MAX: 25) Kick Accuracy: 1

Which reports as 669. 669 - 426 = 243. Which was correct at the time of this post.

Hopefully someone will find this useful. @7hawk77 tagging you since you've been doing stats a lot, and as a dev you may have something to throw in since it's really just algorithmic stuff in the JS.

Again the link: https://jsfiddle.net/Noppadet/9zruhxw5/

Javascript isn't my forte I do C# mostly so don't judge :shrug:.


GRADED


TPE Calculation Tool for Stats Writers - timeconsumer - 07-14-2017

Awesome stuff!

My tool was the exact same (paste in from templates in the same format) except it was in Excel and used a bunch of left() right () len () and search () functions to accomplish it.

Must be a lot easier knowing code than trying to make excel do things it's not really good at.


TPE Calculation Tool for Stats Writers - Noppadet - 07-14-2017

(07-14-2017, 04:06 PM)timeconsumer Wrote:Awesome stuff!

My tool was the exact same (paste in from templates in the same format) except it was in Excel and used a bunch of left() right () len () and search () functions to accomplish it.

Must be a lot easier knowing code than trying to make excel do things it's not really good at.

See I can only do the basics with Excel like SUM and stuff personally, and I've seen some damn Excel wizards. It's just what you're familiar with I guess.

But thanks.


TPE Calculation Tool for Stats Writers - 7hawk77 - 07-14-2017

This is great!

I just noticed that it's calculating my TPE at 197 when I think I have it listed at 187... Guess it's time to audit my character... Sad


If I get some free time in the future, I might play around with weighting stats based on my findings to show like effective TPEs.




TPE Calculation Tool for Stats Writers - timeconsumer - 07-14-2017

(07-14-2017, 07:20 PM)7hawk77 Wrote:If I get some free time in the future, I might play around with weighting stats based on my findings to show like effective TPEs.

Now you're cooking with gas.


TPE Calculation Tool for Stats Writers - 7hawk77 - 07-14-2017

(07-14-2017, 05:26 PM)timeconsumer Wrote:Now you're cooking with gas.

I'm still playing around with the attributes as they scale from 1-100, found a few scaling functions that are ok but nothing great. Ideally I'd combine a function of that with assigning attributes weights based on my correlation coefficients.

Then I could call it the TPE BS score.


TPE Calculation Tool for Stats Writers - 37thchamber - 07-17-2017

(07-15-2017, 12:06 AM)timeconsumer Wrote:Awesome stuff!

My tool was the exact same (paste in from templates in the same format) except it was in Excel and used a bunch of left() right () len () and search () functions to accomplish it.

Must be a lot easier knowing code than trying to make excel do things it's not really good at.
Ehh... excel is okay at these things if you use VBA. It's actually pretty good at it. Looking at the javascript here, it wouldn't be hard to replicate it in VBA.

You could probably write functions in googlescript doing the same things and chuck this on googledocs too. Easier to port and share that way afaik (gs is based on js, iirc).

Though checking this, I have more TPE than I thought.
Or there's an error here that I don't see. Time to go digging, it seems!


TPE Calculation Tool for Stats Writers - timeconsumer - 07-17-2017

(07-17-2017, 09:33 AM)37thchamber Wrote:Ehh... excel is okay at these things if you use VBA. It's actually pretty good at it. Looking at the javascript here, it wouldn't be hard to replicate it in VBA.

You could probably write functions in googlescript doing the same things and chuck this on googledocs too. Easier to port and share that way afaik (gs is based on js, iirc).

Though checking this, I have more TPE than I thought.
Or there's an error here that I don't see. Time to go digging, it seems!

Yeah I do a little VBA and would be able to assemble that with a small amount of effort and googling. But my knowledge of functions has kind of made me use them as a crutch so times like this where it would be an opportunity for me to stretch my VBA legs I just take the fast and easy route and use a bunch of text functions with a value() to convert them back to numbers. One day I'll stop doing that......I think.


TPE Calculation Tool for Stats Writers - 37thchamber - 07-17-2017

Nah I get you. I used to work in healthcare, so security was really tight and whenever I produced dashboards and reports etc I had to avoid using VBA otherwise it wouldn't get through their security.

Now I use VBA for most things though. Especially if it's reusable, or the formula dramatically increases filesize. Started writing my own functions etc, made an add-on eventually. Don't think I have anything that would be useful for this though, so functions are probably the way I'd go at first too.

I might have a go at porting something like this to googledocs this week. Good practice, and might be a bit more useful for side by side comparison etc