Mystcraft-Issues icon indicating copy to clipboard operation
Mystcraft-Issues copied to clipboard

Request: Ability for API-specified words to have custom rendering

Open ReikaKalseki opened this issue 9 years ago • 12 comments

I have some custom words I added to MystCraft for ChromatiCraft, and to make them a hybrid of CC and MystCraft style, I need more rendering flexibility than is currently afforded to the words. I basically would need a hook into drawSymbol and drawWord in GuiUtils so that I can choose things like how the words and components are arranged and rendered.

The easiest way to implement this would probably be something like another interface extending IAgeSymbol, like "ICustomAgeSymbol", which specifies a void render(int x, int y, float scale) method, and patching the GuiUtils methods appropriately.

ReikaKalseki avatar Oct 13 '15 23:10 ReikaKalseki

Hardly the best approach, I'm afraid. I won't do it that way. The words have support for custom sprite sheets, though I don't recall if that got exposed in the API rebuild. There's also an element of maintaining style. Your words should look like the other words. So if you can specify how you want your words to be different I can look at expanding the options for drawing words. :)

XCompWiz avatar Oct 19 '15 13:10 XCompWiz

There's also an element of maintaining style. Your words should look like the other words.

Well, as stated above, I was trying to hybridize the design styles (as I do with, say, TC, integration). I have custom texture sheets as is, but I was trying to basically render a one-part image with multiple layers (with different pages having each layer active), essentially with each layer being a word and thus a "poem" consisting of multiple layers.

ReikaKalseki avatar Oct 25 '15 21:10 ReikaKalseki

Can you provide a screenshot of as-is and a mock-up of what you want to achieve?

XCompWiz avatar Nov 11 '15 22:11 XCompWiz

I apologize for taking so long to reply; getting the pages to actually register took far longer than anticipated, and prevented me from doing anything else.

Here is the current tilesheet; As above, each tile corresponds to a concept/flag/word (eg pylons may be "energy" and "structure", cave crystals "material", "mineral", and "energy", and the "energy drain" instability "energy", "player", "upgrade", and "inversion".

So pylon would look like this, cave crystals like this, and energy drain like this.

The problem is the default page renderer offsets and scales the layers relative to each other, resulting in a messy and disjointed appearance.

ReikaKalseki avatar May 04 '16 04:05 ReikaKalseki

So you want to use a custom texture sheet and have the words overlap, rather than be arranged as a poem?

XCompWiz avatar Jul 30 '16 16:07 XCompWiz

That would be correct, yes.

ReikaKalseki avatar Jul 30 '16 18:07 ReikaKalseki

I'll think about ways to support this easily. I think I might make it so that the overlap vs distribute is bound to the sprite sheet, so all poems built with a sprite sheet are overlapped. Probably easiest to work with from your side and partially enforces the desired style.

XCompWiz avatar Jul 30 '16 22:07 XCompWiz

That sounds like it would work.

ReikaKalseki avatar Jul 31 '16 00:07 ReikaKalseki

Changes to how item renders work has necessitated lots of internal changes. If this is still something you want to do, please let me know.

XCompWiz avatar Jul 21 '18 12:07 XCompWiz

I assume you mean the changes later MC versions? I have not updated to those yet, but yes, this is still something I would like to do.

ReikaKalseki avatar Jul 21 '18 15:07 ReikaKalseki

Once you've updated to 1.12 (or otherwise caught up) we can talk about options. Mostly I think we'll look at how you can specify new words and control their rendering, but the poems are likely to be mechanically used in the future, so they'll have to conform to that.

XCompWiz avatar Jul 21 '18 21:07 XCompWiz

Fair enough.

ReikaKalseki avatar Jul 21 '18 21:07 ReikaKalseki