Zippy-Egoboo Home EgoWiki > Documentation > MakingZippyObjects > ZippyNameGenerator EgoWiki webs:
Main | TWiki | Know | Sandbox
Documentation . { Changes | Index | Search | Go }
The name generator for Zippy 0.0.3 is defined in basicdat/naming.lua. It is a class that generates a name randomly from a set of options for each of a pre-defined set of "slices". It is very similar to the "chop-style" generator built into the original engine. The following is an example of name generation using this class:

namegen = NameGenerator(List({"Pl", "Gr",  "D", "W", "L"},
                             {"u",  "o",   "a"},
                             {"mp", "ggy", "mp", "nk", "mple"}))

namegen:seed_generator(tonumber(date("%s")))
print("Name: ", namegen:new_name())

This example generates names such as "Plaggy" and "Lonk".

-- ElminI - 03 Feb 2004

Topic ZippyNameGenerator . { Edit | Attach | Ref-By | Printable | Diffs | r1.2 | > | r1.1 | More }
Revision r1.2 - 28 Feb 2004 - 00:35 GMT - ElminI
Parents: WebHome > MakingZippyObjects
Copyright © 1999-2003 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding EgoWiki? Send feedback.