Mystcraft-Issues
Mystcraft-Issues copied to clipboard
Request: Ability for API-specified words to have custom rendering
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.
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. :)
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.
Can you provide a screenshot of as-is and a mock-up of what you want to achieve?
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.
So you want to use a custom texture sheet and have the words overlap, rather than be arranged as a poem?
That would be correct, yes.
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.
That sounds like it would work.
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.
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.
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.
Fair enough.