Graphic lumps localization?

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
Bilbö Bägginson
Posts: 24
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Graphic lumps localization?

Post by Bilbö Bägginson »

Is there any possibility to change shown pic according to chosen language.
I want to localize patchItems in main menu and "read this" page.
User avatar
Enjay
 
 
Posts: 26444
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Graphic lumps localization?

Post by Enjay »

I don't know about graphics (I *think* the answer is probably no, but I don't know for sure). However, it is possible to redefine the menus using text instead of graphics lumps (in MENUDEF) and these could then probably be localised.
User avatar
Bilbö Bägginson
Posts: 24
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Graphic lumps localization?

Post by Bilbö Bägginson »

Ok, I think I could set my pics as symbols of custom font or something. But what about info-page localisation? Because it is just a single image and you can`t add any text there, as I know.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48597
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Graphic lumps localization?

Post by Graf Zahl »

There is an option for this, but with one caveat: The replacement graphic needs to be the same size as the original. The feature also hasn't seen much testing.
You have to put the localized versions of your graphics into "localized/textures/{texturename}.{languageid}.{extension}, e.g. 'localized/textures/titlepic.de.png'.
The whole feature is also under user control, if the 'cl_gfxlocalization' CVAR is set to 0, it will force use of the original graphic and there's other settings here when it comes to graphical menu entries - of course these are strongly discouraged when making a localization-aware mod.

The feature was never officially announced because it didn't really work as well as we wanted - but for text containing fullscreen graphics or in-game textures it should be ok.
User avatar
Bilbö Bägginson
Posts: 24
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Graphic lumps localization?

Post by Bilbö Bägginson »

It could translate full-screen credit image, but not the patches. But it`s ok, I could replace them with text. Thanks
User avatar
Bilbö Bägginson
Posts: 24
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Graphic lumps localization?

Post by Bilbö Bägginson »

Graf Zahl wrote: Tue Jun 07, 2022 12:37 am There is an option for this, but with one caveat: The replacement graphic needs to be the same size as the original. The feature also hasn't seen much testing.
You have to put the localized versions of your graphics into "localized/textures/{texturename}.{languageid}.{extension}, e.g. 'localized/textures/titlepic.de.png'.
Is there some way to use the feature with pictures defined in TEXTURES?
I need to scale them.

Return to “Scripting”