Kittyverse
kittyverse library - helper classes for cattributes, trait types, traits, genes, genomes and more for cryptokitties and copycats
- home :: github.com/cryptocopycats/kittyverse
- bugs :: github.com/cryptocopycats/kittyverse/issues
- gem :: rubygems.org/gems/kittyverse
- rdoc :: rubydoc.info/gems/kittyverse
Usage
Traits
Use the Traits
helper class to lookup trait types (e.g. fur, pattern, eye color, eye shape, base color, etc.) and traits (e.g. savannah, selkirk, chantilly, etc.):
t = Traits[ 'FU00' ]
p t.class #=> Trait
p t.name #=> "Savannah"
p t.type.name #=> "Fur"
p t.code #=> "FU00"
p t.kai #=> "1"
# -or-
t = Trait.find_by_code( 'FU00' )
t = Trait.find_by( code: 'FU00' )
t = Traits[ 'savannah' ]
t = Traits[ 'Savannah' ]
t = Trait.find_by_name( 'Savannah' )
t = Trait.find_by( name: 'Savannah' )
t = Traits[ :body ][ '1' ]
t = Traits[ :body ][ '00' ]
t = Traits[ :body ][ 0 ]
t = Traits[ 'FU' ][ '00' ]
t = Traits[ 'FU' ][0]
t = Traits[ :FU ][0]
t = Traits[ :FU00 ]
t = Traits[ 'Fur' ][0]
# ...
What about totesbasic
?
Note, the totesbasic
pattern cattribute has three traits, that is, totesbasic 1
with the code PA14
and totesbasic 2
with PA15
and totesbasic 3
with PA23
.
Use:
t = Traits[ 'PA14' ]
p t.class #=> Trait
p t.name #=> "Totesbasic 1"
p t.type.name #=> "Pattern"
p t.code #=> "PA14"
p t.kai #=> "f"
# -or-
t = Trait.find_by_code( 'PA14' )
t = Trait.find_by( code: 'PA14' )
t = Traits[ 'totesbasic 1' ]
t = Traits[ 'Totesbasic 1' ]
t = Trait.find_by_name( 'Totesbasic 1' )
t = Trait.find_by( name: 'Totesbasic 1' )
t = Traits[ :body ][ 'f' ]
t = Traits[ :body ][ '14' ]
t = Traits[ :body ][ 14 ]
# ...
For trait types (e.g. fur, pattern, eye color, eye shape, base color, etc.) use:
tt = Traits[ :body ]
p tt.class #=> TraitType
p tt.name #=> "Fur"
p tt.code #=> "FU"
p tt.genes #=> "0-3"
# -or-
tt = TraitType.find_by_key( :body )
tt = TraitType.find_by( key: 'body' )
tt = Traits[ 'Fur' ]
tt = TraitType.find_by_name( 'Fur' )
tt = TraitType.find_by( name: 'Fur' )
tt = Traits[ 'FU' ]
tt = Traits[ :FU ]
tt = TraitType.find_by_code( 'FU' )
tt = TraitType.find_by( code: 'FU' )
# ...
Cattributes
Use the Cattribute
helper class to lookup cattributes incl. purrstige cattributes with timed trait recipes / forumlas:
c = Cattribute[ 'savannah' ]
p c.class #=> Cattribute
p c.name #=> "Savannah"
p c.type.name #=> "Fur"
p c.traits.size #=> 1
p c.traits #=> ["Savannah"]
p c.traits[0].code #=> "FU00"
# ...
c = Cattribute[ 'totesbasic' ]
p c.class #=> Cattribute
p c.name #=> "Totesbasic"
p c.type.name #=> "Pattern"
p c.traits.size #=> 3
p c.traits #=> ["Totesbasic 1", "Totesbasic 2", "Totesbasic 3"]
p c.traits[0].code #=> "PA14"
p c.traits[1].code #=> "PA15"
p c.traits[2].code #=> "PA23"
# ...
c = Cattribute[ 'bionic' ]
p c.class #=> Cattribute
p c.name #=> "Bionic"
p c.type.name #=> "Purrstige"
p c.traits.size #=> 0
p c.traits #=> []
p c.recipe #=> {time: {start: "2019-05-01", end: "2019-08-31"},
# traits: ["Ragdoll",
# "WE05",
# ["Totesbasic 1", "Totesbasic 2", "Totesbasic 3"],
# "PU30"]}
# ...
Fancies
Use the Fancy
helper class to lookup fancy or exclusive or special edition cats incl. timed trait recipes / forumlas, counts, limits, ids and more:
f = Fancy[ :genesis ]
p f.class #=> Fancy
p f.name #=> "Genesis"
p f.key #=> :genesis
p f.exlusive? #=> true
p f.ids.size #=> 1
p f.ids #=> [1]
#...
# -or-
f = Fancy.find_by_key( :genesis )
f = Fancy.find_by( key: 'genesis' )
f = Fancy[ 'Genesis' ]
f = Fancy.find_by_name( 'Genesis' )
f = Fancy.find_by( name: 'Genesis' )
# ...
f = Fancy[ :bugcat ]
p f.class #=> Fancy
p f.name #=> "Bug Cat"
p f.key #=> :bugcat
p f.exlusive? #=> true
p f.ids.size #=> 3
p f.ids #=> [101,102,103]
#...
# -or-
f = Fancy[ 'Bug Cat' ]
f = Fancy[ 'BugCat' ]
f = Fancy[ 'bugcat' ]
f = Fancy.find_by_name( 'Bug Cat' )
f = Fancy.find_by( name: 'Bug Cat' )
# ...
Fancy Cat Types
p Fancy.size #=> 83
p Fancy.exclusives.size #=> 22
p Fancy.special_editions.size #=> 5
p Fancy.fancies.size #=> 56
Loop over all fancies:
Fancy.each do |fancy|
p fancy.name
end
# ...
Real World Usage
Reference Pages / Cheat Sheets
Auto-generated CryptoKitties reference pages / cheat sheets include:
- CryptoKitties Cattributes Rarity / Popularity Statistics
- CryptoKitties Genome / Genes Cheat Sheet - Fur (FU) • Pattern (PA) • Eye Color (EC) • Eye Shape (ES) • Base Color (BC) • Highlight Color (HC) • Accent Color (AC) • Wild Element (WE) • Mouth (MO) • Environment (EN) • Secret Y Gene (SE) • Purrstige (PU)
- CryptoKitties Traits Cheat Sheet (with Codes, Mewtation Levels / Tiers, Search Links and More)
- CryptoKitties Updates - Fancy / Exclusive / Special Edition Cats - Timeline
- CryptoKitties Updates - Purrstige Trait Recipes / Formulas - Timeline
- and others
More
See the copycats command line tool (and core library) - crypto cats / kitties collectibles unchained - buy! sell! hodl! sire! - play for free - runs off the blockchain - no ether / gas required
More Documentation / Articles / Samples
- Programming Crypto Collectibles Step-by-Step Book / Guide - Let's start with CryptoKitties & Copycats. Inside Unique Bits & Bytes on the Blockchain...
- Ruby Quiz - Challenge #8 - Base32 Alphabet - Convert the Super "Sekretoooo" 256-Bit CryptoKitties Genome to Kai Notation - Annipurrsary!
License
The kittyverse
scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
Questions? Comments?
Post them on the cryptokitties reddit. Thanks.