Page 1 of 1
Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 12:03 am
by meadwarrior
Hello!
When players take a closer look at an inventory object (by dragging it on the eye), I'd like to display something like this:
Preferably, it would be a custom
inter_objlook graphic for every single object that
doesn't display the name or the weight.
Is this something that can be done without much hassle, or is this going to require a lot of code?
Thanks!
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 12:44 am
by Sophia
I'm actually not sure what you're asking. If you just want to add a textual description to an object, you probably don't want to have the text as a separate image, but rather just have DSB insert the text for you. You can do that with a longdesc arch property or exvar.
I could also add support for an arch to define a custom background that is drawn instead of inter_objlook if that would help you. (Actually, this seems handy and it's general purpose enough, so I'll do this anyway!)
Otherwise, if you want to make more extensive changes to what you see when you drag an object over the eye, you can edit sys_render_object but that will probably require a decent amount of code.
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 10:29 am
by meadwarrior
Sophia wrote: Sat Dec 15, 2018 12:44 am
I could also add support for an arch to define a custom background that is drawn instead of
inter_objlook if that would help you. (Actually, this seems handy and it's general purpose enough, so I'll do this anyway!)
That sounds good!
The way I'd imagine it would look something like
Code: Select all
obj.testobject = {
type=...
...
objlook = gfx.testobject_objlook
}
Just so one could provide custom graphics for every object archetype.
Thanks!
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 1:22 pm
by Gambit37
Are you preparing graphics for this with the text already pre composed? That will become a nightmare to update, trust me, been there done that

. If you have lots of text to use, it's better to use the longdesc property as Sophia mentioned (but that will use the standard DM font). If you want to use a different font, that's more complex but I can write up a tutorial for that as I've lots of experience with DSB custom fonts by now.
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 2:45 pm
by meadwarrior
You're right and it's true, I'm thinking about preparing everything in Photoshop... I'm already used to having lots of slightly different graphics around, so I guess it's the less nightmarish nightmare for me
Being able to put everything I want inside that field in any way possible makes up for it, though.

That said, I'd really appreciate a tutorial on replacing the standard DM font!

Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 6:16 pm
by Sophia
There is really nothing about that example graphic that isn't doable in sys_render_object, and doing it that way will be better in the long run because the graphic is being dynamically created by DSB rather than you being stuck with a static image. It'll also save a decent amount of memory!
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 6:37 pm
by Gambit37
How would DSB handle the two different style fonts in the last line?
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 6:42 pm
by meadwarrior
While I absolutely agree with what you say, I'd still argue that the custom background (instead of objlook) support is something worthwile to have, particularly for edge cases like, say, smeared or otherwise obfuscated text (for puzzles), for easy text effects (different fonts, outlines and highlights, like with 'Arva' above) and other unique things that only happen with certain, singular items.
Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 7:59 pm
by Sophia
Gambit37 wrote: Sat Dec 15, 2018 6:37 pm
How would DSB handle the two different style fonts in the last line?
Not automatically, but you can specify a font in
dsb_bitmap_textout so it's still doable with multiple calls to that function.
meadwarrior wrote: Sat Dec 15, 2018 6:42 pm
I'd still argue that the custom background (instead of objlook) support is something worthwile to have, particularly for edge cases like, say, smeared or otherwise obfuscated text (for puzzles), for easy text effects (different fonts, outlines and highlights, like with 'Arva' above) and other unique things that only happen with certain, singular items.
Oh, yeah, don't worry, custom objlook support is still happening.

Re: Custom graphics for objects in inter_objlook possible?
Posted: Sat Dec 15, 2018 8:10 pm
by meadwarrior
Sophia wrote: Sat Dec 15, 2018 7:59 pm
Oh, yeah, don't worry, custom objlook support is still happening.
