DrakesRename it Wiki

Updated 2 months ago

DrakesRenameIt V0.5.0

How to use:

Simply Press shift + right click on any item you want to rename. Press ctrl + right click on any item you want to change the description of! (new!) A dialog prompting you to change your items name/description will appear Okay will confirm the dialog with your change, reset button will bring it back to the items original localized string. It always appears with the current name including localization. If you would like to maintain localization with an additional name, simply leave the $string intact and add around it.

you can customize the colors of the press control and press shift using the ctrl / shift settings in config

Rename anything:

image

Lock others from changing your names:

image When the lock to owner is enabled, you can make it so only the person who crafted an item can change the name. If admin override is on, they can still update it. Another setting is claim by rename, this is for things like sticks and stones, editing them will make you owner for the purposes of this setting

Easy to use Shift + Right click in inventory: You can recolor and even keep localized strings.

image So with this, the same rules present for standard signs like <color=colorName> or <color=#ffffff> hex code can be used. you can short hand this is <#ff0000> for instance or even shorter with <#f00> just like normal signs. You can also use <size=100> but ive seen over about 200 is funky. recomend also setting a character cap for name, you should keep in mind the use of <color> tags to aniticipate this as well. May want to give yourself a buffer. Name char limit is 50 by default and description is 1000

New now we have descriptions!

image We now have descriptions, they work by overriding the tooltip update. It works simular to names, localization also works, if you want to keep the original description but a little more.

Localization

So with localization you can simply keep the original $string in tact. If you want to confuse people or whateever you can even take the localization string from other items if you want. you can throw a color and keep the name intact if you want like <#f00> $hammer for instance to make a red hammer. Want a hammer to be named hoe? sure you can do that.

Admin Override: when this is enabled admins can completely override any of the settings such as enabled desc, name, owner etc etc. This honestly is the only thing that makes sense for both name and desc being disabled. You could preplace items or have it so admins can hand out special items noone else can rename. May be more fun, make it special if not everyone can rename stuff. Admin override will have a blue name that indicates the admin overrides to let you know it is actually disabled but your admin powers override

API hook:

there is a code piece on DrakesRenameit.API use DrakesRenameit.API.IsAdminOrVIP to check the same way the mod does but more importantly if you need to add a player to the list because your mod checks differently such as an admin whitelist different than the normal admin txt simply make a call to: DrakesRenameit.API.AddVIP(ID) I have an overload you can have a whole list if you want. If its easier you can just add player names (server synced) VIP list in the config as well but that API lets other mods add dymanically to the list.

Under the hood

The way the renameit tool adds new names and descriptions is utilizing itemData.m_customData we do not change the shared_mname in anyway or the actual descrption. It is all superfisual updates where the original text would be displayed when we set the name we add the custom tag. If you are making a mod that works with this: you can remove the name from our object simply by clearing out the tag: with an item.mCustomData.Remove("Drake_Rename") and for description: "Drake_Rename_Desc"

likewise if you want to update an items text simply change those keys