Repository navigation
Mod Functions
AgentCucco edited this page Jan 22, 2021
·
3 revisions
Encyclopedia.AddItem(mod, class, id, wikidesc, pools, name, desc)- Adds an item the 'Items' encyclopedia menu.
- See Adding Items to learn how to use it.
Encyclopedia.AddTrinket(mod, class, id, wikidesc, name, desc)- Adds a trinket the 'Trinkets' encyclopedia menu.
- See Adding Trinkets to learn how to use it.
Encyclopedia.GetItemPoolIdByName(name)- Returns an id matching the 'name' used.
-
name: 'string'. The custom name for your pool.- Names matching the vanilla syntax are preferred. (Ex. "POOL_SWINE_BEGGAR".)
Encyclopedia.RegisterSprite(gfxroot, anmtoplay, anmframe, newspr, layer)- Returns a Sprite() object.
-
gfxroot: 'string'. The root for your anm2. (Ex. "gfx/ui/swine_beggar_icon.anm2".) -
anmtoplay: 'string'. The animation you want to play. (optional) -
anmframe: 'number'. The frame you want your anm2 to play. (optional)- Note: Remember anm2 frames start at 0, not 1.
-
newspr: 'string'. The root for your png. (optional) (Ex. "gfx/ui/icons/swine_beggar_icon.png".) -
layer: 'number'. The layer you want to replace with your png. (optional)- Note: Remember anm2 layers start at 0, not 1.
Encyclopedia.AddItemPoolSprite(id, sprite)- Adds a new itempool sprite to the Encyclopedia, linked to the id.
-
id: 'number'. Your custom pool id. (Generated with Encyclopedia.GetItemPoolIdByName().) -
sprite: 'sprite'. Your custom sprite object. (Either manually generated, or with Encyclopedia.RegisterSprite().)
Encyclopedia.EIDtoWiki(desc, title)- Returns a table in Wiki format.
- See Creating Wiki Descriptions to learn how to use it.