User Pass
Home Sign Up Contact Log In
kaiijy
offline
Link
 
Slow Saturday, so I built a Character Calculator: https://gist.github.com/philgruneich/10563219

It runs on Python and it is extremely rustic by now (yes, I could create a module and let you just import the whole thing and run as a function, but it is saturday and I'm lazy on weekends)

For now, you'll have to modify the script, scroll to the bottom and you'll find something like this:

player = {
'position': 'TE',
'attributes': {
'strength': 5,
'agility': 10,
'speed': 5,
'confidence': 5,
'stamina': 5,
'awareness': 5
},
'height': heights_help['66'],
'weight': 243,
'traits': [traits_help['Soft Hands'],traits_help['Receiving Specialist'],'workhorse']
}

This is an example. Modify the values (there are instructions inside if you don't know your real height (you can pick on a script on the source code) or the key name of your traits.

The output will be something like this:

{'Receiving Grip': 63, 'Pass Blk Power': 48, 'Rec Consistency': 57, 'Balance': 80, 'Pass Blk Awr': 53, 'Rec Awareness': 63, 'Lead Blk Awr': 56, 'Heart': 53, 'Snap Reaction': 57, 'Carrying Grip': 60, 'Vertical': 87, 'Pass Blk Tech': 76, 'Block Consistency': 55, 'Power Running': 60, 'Run Blk Power': 56, 'Footwork': 80, 'Diving': 80, 'Catch in Traffic': 66, 'Elusive Running': 68, 'Return Awr': 49, 'Quickness': 81, 'Toughness': 60, 'Run Blk Awr': 57, 'Intimidation': 58, 'Conditioning': 60, 'Route Elusiveness': 71, 'Sprinting': 50, 'Route Technique': 78, 'Receiving Hands': 76, 'Run Blk Tech': 82, 'Carrying Awr': 49}
 
Thunderoo
offline
Link
 
Cool! Huh FBs have a big natural bonus for power running, that's interesting.
Edited by Thunderoo on Apr 12, 2014 18:35:29
 
kaiijy
offline
Link
 
Yep, you can find all this info in the skills.js file on GLB2's source code.
 
Jampy2.0
thuggin'
offline
Link
 
Cool

 
kaiijy
offline
Link
 
While you're creating a character, instead of printing the whole dictionary, you can set it into a variable and navigate through it, like this:

result = max(player)

print('Receiving Grip', result['Receiving Grip'])
print('Catch in Traffic', result['Catch in Traffic'])
print('Route Technique:', result['Route Technique'])
print('Receiving Hands', result['Receiving Hands'])
print('Rec Consistency', result['Rec Consistency'])
print('Conditioning', result['Conditioning'])
print('Balance', result['Balance'])
print('Quickness', result['Quickness'])
print('Sprinting', result['Sprinting'])

Which will print this:

Receiving Grip 62
Catch in Traffic 63
Route Technique: 77
Receiving Hands 78
Rec Consistency 69
Conditioning 55
Balance 73
Quickness 67
Sprinting 64

Oh, that's a quite nice TE (:
 
kaiijy
offline
Link
 
Well, I improved it a little:

https://gist.github.com/philgruneich/10602625

Now you can import it as a module and avoid seeing all that crap. It automatically calculates the height if you add it wrapped in "" and also looks for the traits automatically

There's a test file you can use as an example as well.

If you download the module and place it in your Desktop, replace PATH for the path to the Desktop (usually, just drag a file in and you'll get the path, remember to remove the file name)

import sys
sys.path.insert(0, 'PATH') # Here it would be '/Users/Phillip/Desktop/', for example
import glb2calc
player = glb2calc.glb2calc('TE', '66', '243', 'Soft Hands', 'Egotist', 'te_receiver', agility=10)
player.pretty()

If you properly install it, skip the sys part.

import glb2calc
player = glb2calc.glb2calc('TE', '66', '243', 'Soft Hands', 'Egotist', 'te_receiver', agility=10)
player.pretty()

I only included the character builder so far, so you have the build(), which returns a dictionary, and pretty(), which prints the attributes. Enjoy.

https://gist.github.com/philgruneich/10602625
 
kaiijy
offline
Link
 
Another quick update. Now you can compare builds!

You can set multiple builds as variables and compare them (:

For example:

import glb2calc

builder01 = glb2calc.glb2calc('CB', '63', '208', 'Ball Hawk', 'Shutdown Defender', 'Workhorse', strength=3, speed=7, agility=9, awareness=8, stamina=3).build()
builder02 = glb2calc.glb2calc('CB', '63', '208', 'Ball Hawk', 'Shutdown Defender', 'Workhorse', strength=2, speed=7, agility=8, awareness=9, stamina=3, confidence=6).build()
builder03 = glb2calc.glb2calc('CB', '63', '208', 'Ball Hawk', 'Shutdown Defender', 'Workhorse', strength=3, speed=7, agility=8, awareness=9, stamina=3).build()
builder04 = glb2calc.glb2calc('CB', '63', '208', 'Ball Hawk', 'Shutdown Defender', 'Workhorse', strength=2, speed=8, agility=9, awareness=8, stamina=3).build()

glb2calc.glb2calc.compare(builder01, builder02, builder03, builder04)

Return Awr: 74 | 81 | 81 | 74
Coverage Tech: 87 | 84 | 84 | 88
Pursuit: 80 | 87 | 87 | 80
Def Consistency: 53 | 60 | 53 | 53
Pass Rush Power: 33 | 30 | 33 | 29
Quickness: 84 | 77 | 77 | 84
Man Awareness: 82 | 89 | 89 | 82
Balance: 71 | 67 | 65 | 71
Zone Awareness: 74 | 81 | 81 | 74
Break Run Blk: 68 | 64 | 64 | 69
Diving: 76 | 71 | 70 | 76
Tackling Grip: 39 | 38 | 39 | 37
Power Tackling: 41 | 39 | 41 | 38
Strip Technique: 75 | 74 | 75 | 74
Snap Reaction: 65 | 72 | 72 | 65
Heart: 53 | 60 | 53 | 53
Intimidation: 35 | 37 | 35 | 33
Intercepting: 75 | 75 | 74 | 75
Conditioning: 53 | 54 | 53 | 53
Blitz Awr: 66 | 73 | 73 | 66
Pass Rush Defl: 65 | 68 | 68 | 65
Hold Ground: 34 | 32 | 34 | 30
Vertical: 84 | 79 | 78 | 84
Pass Rush Tech: 63 | 59 | 59 | 65
Sprinting: 72 | 72 | 72 | 79
Footwork: 81 | 76 | 75 | 81
Deflecting: 75 | 72 | 72 | 74
Tackling Tech: 75 | 72 | 72 | 74
Toughness: 42 | 44 | 42 | 41
 


You are not logged in. Please log in if you want to post a reply.