All predicatesShow sourcenoble_avatar.pl -- Noble Avatar generator

This library generates random avatar images from components. The file locations of the library are defined by file_search_path/2 rules for noble_avatar_components (the components) and noble_avatar for the generated avatars.

The probalities for the various components are specified in part/1.

Credits and license

The component images can be downloaded from the address below. The images are licensed under CC-BY-3.0. If you use this library with these images, please include the following acknowledgements:

  1. Credit Noble Master Games as follows (linking is optional): "Avatar graphics created by Noble Master Games" and link to http://www.noblemaster.com
  2. Credit the artist "Liea" as follows (optional): "Avatar graphics designed by Mei-Li Nieuwland" and link to http://liea.deviantart.com
See also
- http://opengameart.org/content/avatar-generator-with-15-trillion-combinations
Source noble_avatar(?Gender, -File) is det
Source noble_avatar(?Gender, -File, ?New) is det
True when File is the image file name for a generated avatar of Gender. If Gender is unspecified, it is generated randomly.
Arguments:
New- is a boolean that indicates whether the avatar is newly generated (true) or we re-generated an existing one (false). It may be specified as true to force generating a new avatar. Previously generated avatars can be queried using existing_noble_avatar/2.
Source create_avatar(+PNG, -Image) is det
(Re-)create avatar with basename PNG.
Source existing_noble_avatar(-Gender, -Image) is nondet
True when Image is the image file of a previously generated avatar of Gender.
Source parts(-Parts:list) is det[private]
True when Parts is the list of part specifications for creating a new avatar. Each specification is a term
Probability:Part-Gender

Part is included with Probability and only of Gender matches the target Gender.

Source noble_index_components[private]
Create an index for the Noble Avatar components. The components are searched for in the directory noble_avatar_components(.).

Re-exported predicates

The following predicates are exported from this file while their implementation is defined in imported modules or non-module files loaded by this module.

Source noble_avatar(?Gender, -File) is det
Source noble_avatar(?Gender, -File, ?New) is det
True when File is the image file name for a generated avatar of Gender. If Gender is unspecified, it is generated randomly.
Arguments:
New- is a boolean that indicates whether the avatar is newly generated (true) or we re-generated an existing one (false). It may be specified as true to force generating a new avatar. Previously generated avatars can be queried using existing_noble_avatar/2.