#Itemizer

1 messages · Page 1 of 1 (latest)

sleek pecan
#

Itemizer allows players to change item names and add descriptions (lore) to them.
This mod is inspired by the Minecraft plugin Itemizer.

More info at: https://mods.vintagestory.at/itemizer

Itemizer allows players to change the name and description of items. Great for roleplayers!
The mod is fully compatible with VTML, Vintage Story's markup language.
Here are the commands added by the mod:
/itemizer name [name]Sets the item in hand's name.
/itemizer desc [description]Sets the item's description. To use line breaks, write .
/itemiz...

sleek pecan
#

Released 1.0.2:

  • Fixed the long-standing bug that prevented certain items (seeds, weapons...) from displaying their attributes
pliant pivot
#

Are you working on an update for 1.20?

long zephyr
#

saw this comment on the mod page. any clarity on this issue?

sleek pecan
hazy beacon
#

Seem unlikely. Especially with zero details on what actually breaks

sleek pecan
#

Probably some interference going on in the whole "adding custom descriptions to items" that clashes with another thing better ruins adds, I guess

next spade
#

It's just a lang entry

sleek pecan
#

I'm adding descriptions programatically, so if you were doing that as well, it could've clashed

#

I legitimately have no idea why itemizer and better ruins don't work together

#

I just know that multiple people reported it

next spade
#

so if its clashing with betterruins it should also clash with vanilla

#

works for me

open mantle
#

I've found that I can't rename certain items like potions and flowers. The description works and I get the "Set name to ____!” message, but the name doesn't change.

sleek pecan
#

And some things are weirdly blocks

#

Like peat items

open mantle
#

So if they can be set down,they can't be named?

sleek pecan
#

pretty much, yeah

#

Ground storage and piles don't count though

#

Some are items

idle copper
#

Hey! so we use this mod on our roleplay server and somehow it causes issues with Carilon bells? making the game crash, no clue on my end since im not admin but if they send you the crash log would you be able to take a look at it?

sleek pecan
idle copper
idle copper
shell surge
#

@sleek pecan

public override ItemStack OnPickBlock(IWorldAccessor world, BlockPos pos, ref EnumHandling handling)
{
ItemStack pickedStack = base.OnPickBlock(world, pos, ref handling);
if (pickedStack != null)
{
pickedStack = pickedStack.Clone();
}
IWorldChunk chunk = world.ChunkProvider.GetChunk(pos.X / 32, pos.Y / 32, pos.Z / 32);
string desc = chunk.GetModdata<string>(pos.ToString() + "-itemizerdesc", "");
string name = chunk.GetModdata<string>(pos.ToString() + "-itemizername", "");
if (desc != "" && pickedStack != null)
{
pickedStack.Attributes.SetString("itemizerDesc", desc);
}
if (name != "" && pickedStack != null)
{
pickedStack.Attributes.SetString("itemizerName", name);
}
return pickedStack;
}```
Going with the dnspy decompile, but, can you do a 

if (pickedStack is null) {
return null;
}

after calling base.OnPickBlock?

Similarly, after looking up the chunk, can you do 

if (chunk is null) {
return pickedStack;


This is crashing clients as they try and log in, when the world hasn't really properly loaded yet

There are likely other places that can blow up like this, but 

```System.NullReferenceException: Object reference not set to an instance of an object.
   at itemizer.ItemizerBlockBehavior.OnPickBlock(IWorldAccessor world, BlockPos pos, EnumHandling& handling) in D:\Documents\Developpement\_Vintage Story\vsmods_vscode\itemizer\itemizer\src\ItemizerBehavior.cs:line 138
   at Vintagestory.API.Common.Block.OnPickBlock(IWorldAccessor world, BlockPos pos) in VintagestoryApi\Common\Collectible\Block\Block.cs:line 1267
   at Vintagestory.GameContent.BlockMultiblock.<>c__DisplayClass16_0.<OnPickBlock>b__2(Block block) in VSEssentials\Block\BlockMultiblock.cs:line 229
   at Vintagestory.GameContent.BlockMultiblock.Handle[T,K](IBlockAccessor ba, Int32 x, Int32 y, Int32 z, BlockCallDelegateInterface`2 onImplementsInterface, BlockCallDelegateBlock`1 onIsMultiblock, BlockCallDelegateBlock`1 onOtherwise) in VSEssentials\Block\BlockMultiblock.cs:line 91
   at Vintagestory.GameContent.BlockMultiblock.OnPickBlock(IWorldAccessor world, BlockPos pos) in VSEssentials\Block\BlockMultiblock.cs:line 224
   at Vintagestory.API.Common.Block.GetPlacedBlockName(IWorldAccessor world, BlockPos pos) in VintagestoryApi\Common\Collectible\Block\Block.cs:line 2199
   at Vintagestory.Client.NoObf.HudElementBlockAndEntityInfo.ComposeBlockInfoHud() in VintagestoryLib\Client\Systems\Gui\Huds\HudElementBlockAndEntityInfo.cs:line 56

is being caused by these issues, and leaves players with no opertunity to change what they are looking at to something that isn't going to crash them

spring river
#

Howdy!
We're having an issue on our server where some items cannot be renamed, mostly modded ones but we've also noticed vanilla shields can't be renamed
Any chance there's a way to resolve this?
Thanks!