Custom graphics for objects in inter_objlook possible?
Moderator: Sophia
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
Custom graphics for objects in inter_objlook possible?
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!
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!
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Custom graphics for objects in inter_objlook possible?
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.
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.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
Re: Custom graphics for objects in inter_objlook possible?
That sounds good!
The way I'd imagine it would look something like
Code: Select all
obj.testobject = {
type=...
...
objlook = gfx.testobject_objlook
}
Thanks!
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Custom graphics for objects in inter_objlook possible?
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.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
Re: Custom graphics for objects in inter_objlook possible?
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!
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!
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Custom graphics for objects in inter_objlook possible?
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!
- Gambit37
- Should eat more pies
- Posts: 13720
- Joined: Wed May 31, 2000 1:57 pm
- Location: Location, Location
- Contact:
Re: Custom graphics for objects in inter_objlook possible?
How would DSB handle the two different style fonts in the last line?
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am
Re: Custom graphics for objects in inter_objlook possible?
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.
- Sophia
- Concise and Honest
- Posts: 4240
- Joined: Thu Sep 12, 2002 9:50 pm
- Location: Nowhere in particular
- Contact:
Re: Custom graphics for objects in inter_objlook possible?
Not automatically, but you can specify a font in dsb_bitmap_textout so it's still doable with multiple calls to that function.
Oh, yeah, don't worry, custom objlook support is still happening.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.
- meadwarrior
- Journeyman
- Posts: 91
- Joined: Sat Dec 01, 2018 1:02 am