Iconzz Mod

From Wurm Unlimited
Revision as of 14:29, 24 August 2022 by Tyoda (talk | contribs) (Added Iconzz Mod page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This mod adds the ability for other mods to easily implement a new icon with a single line of code.

How to Use (as a server owner)

If a mod tells you it requires this mod, just download and install it like any other mod.

How to use (as a modder)

Add a new icon to the game by simply adding this mod as a library in your .properties file:

depend.requires=Iconzz

And adding one line in the code:

short iconId = Iconzz.getInstance().addIcon("IconName", "mods/ExampleMod/icons/IconName.png");

You can then use this ID while creating item templates to use the newly added icon:

ItemTemplateBuilder exampleItem = new ItemTemplateBuilder("ExampleItem").imageNumber(iconId);

For an example, see the Example mod

NOTE: The icon images must be 32x32, and the IconName in addIcon must be unique among all mods that use this library (so it's a good idea to prefix them with your mod's name or something else unique).

Extra features

  • Huge Bell will now have an icon
  • Golden Mirror will now have an icon
  • Removed weird random lines on the borders of some icons
  • Removed default icon cube from behind the muffin icon lol
  • Server owners can edit the images in the mod's resources folder to customize the game's icons to their liking!

Mods that use this library

Links

Download mod: https://github.com/Tyoda/Iconzz

Forum thread: https://forum.wurm-unlimited.net/viewtopic.php?f=12&t=163