Legendary Tooltips [Forge]

Legendary Tooltips [Forge]

28M Downloads

18.2 Question: advance defintions/selectors

Shibva opened this issue ยท 25 comments

commented

Is there a way for me to include 2 statements into one definition to further refine the specific thing you want to apply it to?

Example: Minecraft:dirt and ^ima tooltip
(only applies to dirt that has this specific tooltip)

commented

so how does the priority work overall with in-game config and resource packs? I see that it is applied by what comes first but how does it define what comes first?

commented

For your first suggestion, you could set up borders to do that manually but an automatic option is a good idea, I'll consider it.
As for priorities, there are two different systems to consider. First, in a resource pack you can optionally define priority for each frame, but if you don't then the frames will just be checked based on the order they are defined in the frame_definitions.json file.
The second priority system to be aware of is defined in the legendary tooltips config file, where you can define the order that the built-in 16 frames are checked. You can also define in the config file if configuration file-defined frames come before or after resource pack-defined ones. Hopefully that's not too confusing...

commented

also does the file have to be a specific pixel size/ratio?

commented

The ability to combine multiple selectors was added in version 1.4.0 of Legendary Tooltips (or more precisely, in version 1.1.0 of Iceberg, which is the library that provides item selector functionality). Unfortunately this version has not been released for 1.18.2. For now, you may need to try some other method of getting the borders to match as you want, perhaps NBT tags if that's possible for your use case.

commented

Here is the selector documentation if it's helpful: https://github.com/AHilyard/Iceberg/wiki/Item-Selectors-Documentation

commented

what im currently doing is reimplimenting some textures however one frame has a resolution of 128x128 while the original files use in the resource pack you made is a 64x16

so would I be able to use this file if I modify the file want to use to use a 256x1024 size instead?

commented

I was trying that, but the big problem is with priority;

But more so I'm trying to use an NBT tag that does not exist

For example; if the item does not have durability

commented

Could you give me the specific item so I can see if there are other alternatives that would work?

commented

Well, part of what I was trying to do was to replace the common white border rarity with something a little bit darker by default.

Pretty much given up on that adventure, though I'm still working on applying some more stuff

since you're here, I guess it's all right if I can ask you this:

If you're making a resource pack for this stuff, what is the total maximum amount of different frames you're gonna have? The original file looks like it can fit 16 but could go farther than that if you expand the file size?

commented

If you are making a resource pack, you can have unlimited custom frames. Each image can only have up to 16 frames, but you can define frames from any number of images. Here's the frame definition format: https://github.com/AHilyard/LegendaryTooltips/blob/1.19.3/src/main/resources/assets/legendarytooltips/frame_definitions.json

commented

Neat, but that only partially answers what I was asking.

I guess I should've been a bit more specific instead of custom frames

commented

Sorry, I must've misunderstood. Are you asking if I am making a resource pack?

commented

No, I'm making one

I was just wondering if there was a way that I could add more than 16 custom frames in one resource

commented

Yes, you can. One resource pack can have as many images as you want with any names (frames1.png, frames2.png, for example), and each one of those images can have up to 16 frames. Then, in your frame_definitions.json file, you can just specify which image each frame comes from.

commented

and how do I do that? specify which file to use when referencing more than one frame?

Edit: sorry that came off rude; Im interested to have learned this just now

commented

No worries, if you look at the frame_definitions.json file I linked above, there are comments that explain how it works. There is an optional "image" property where you can put the name of your image. If you don't put it, it will use legendary tooltip's default frame image (legendarytooltips:textures/gui/tooltip_borders.png).

commented

ill check this out; glad that this is 18.2

thanks man

commented

You're welcome, let me know if you run into any issues with it. ๐Ÿ™‚

commented

ya know, I have 2 ideas. a border color selector option that will tell it to automatically render it as the color of the rareity (seems redundant till you consider that colored names created by things like commands also influence it)

and maybe an internal shine control to "force off" the shine effect if you have it enabled on borders that you don't wish to have that gleam to it (way it is currently its all or nothing)

commented

thanks for clarifiying

commented

The mod is expecting a size of either 64x64 or 128x128, but regardless of what size the image is, the frames have to be 64x16 pixels.

commented

thanks again for all the help

commented

If I could make a recomendation as well; maybe have an option that goes with file select to specify if you wish to have it work on a 128x32 option

commented

hey uh;

Do you happen to have a example template or a "wireframe" map to help align the borders of the textures?

commented

frame_template
This is the template I used when making Eclectic Trove.