Skip to content
Deviant edited this page Dec 11, 2023 · 8 revisions

ENC:

Main class for generating character cards

Class Arguments:

Argument Description type Example
lang Set generation language. str lang = "en"
uid Game UID str or int uid = "123456789"
character_art dictionary, where the key is
the character ID,and
the values ​​are list or str
a link to the image to replace the splash
dict character_art = {"10000079": "link","10000037": ["link","link"]}
character_id Comma-separated list of character IDs to generate str character_id = "10000079,10000037"
hide_uid Whether to display the UID on the card or not bool hide_uid = True
save Save the generation result to storage media? bool save= True
pickle Dictionary with settings for pickle cache operation dict How to use is described here: Pickle
agent Substitute your User-Agent for requests to the api str agent = "Bot_Name"

create() function:

Function for generating character cards

Function Arguments:

Argument Description type Example
template Select a template int or str template = 1
akasha Add rating from Akasha System bool akasha = True

Function Resultat:

info=Info(uid='811455610', lang='en', save=False) card=[Card(id=10000060, name='Yelan', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B048601810>), Card(id=10000062, name='Aloy', element='Ice', rarity=4, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B04175E910>), Card(id=10000073, name='Nahida', element='Grass', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0417139D0>), Card(id=10000052, name='Raiden Shogun', element='Electric', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B041050250>), Card(id=10000089, name='Furina', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B041872F50>), Card(id=10000087, name='Neuvillette', element='Water', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0411645D0>), Card(id=10000058, name='Yae Miko', element='Electric', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0486ACF90>), Card(id=10000046, name='Hu Tao', element='Fire', rarity=5, card=<PIL.Image.Image image mode=RGBA size=1511x1301 at 0x1B0410B9F90>)] character_id=['10000060', '10000062', '10000073', '10000052', '10000089', '10000087', '10000058', '10000046'] character_name=['Yelan', 'Aloy', 'Nahida', 'Raiden Shogun', 'Furina', 'Neuvillette', 'Yae Miko', 'Hu Tao'] pickle_size=None

info - ENC Class Settings Information.

  • info.uid - User UID.
  • info.lang - Select lang generated.
  • info.save - Is the image saved.

card - List of generated character card images.

  • card.id- Character id.
  • card.name - Character name.
  • card.element- Character element.
  • card.rarity- Character rarity.
  • card.card - Generated character card.

character_id - List of all character ids for the user

character_name - List of all character name for the user

pickle_size - If the size parameter was passed to pickle, it will return data about the sizes of pickle files

Additional features of the function:

await get_charter() - Returns a sorted dictionary {"id": "name", ..}

await resultat.get_charter(setting=True) - Returns a sorted dictionary {"id": "name", ..} Only those characters specified in character_id

await resultat.get_charter(name=True) - Returns a sorted dictionary {"name": "id", ..}

banner

Clone this wiki locally