mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Can't apply shader to platecharset! (replace veh plate font)

Open MrSol0 opened this issue 6 years ago • 2 comments

Describe the bug

replacing vehicles plate font. MTA doesn't see platecharset texture (using shader_tex_names), so we can't replace it with better font (this font is really saved as .png and it is placed in vehicles.txd

To reproduce

1- Try replace the texture with shader won't work because it's not a world texture, but GTA SA converts the characters from platecharset to world texture "Plate" for each vehicle. or at least that's how i think it works.

Expected behaviour

expected to be able to change "platecharset" and change the fonts and the characters foe other languages and make some cool realistic car plates.

Screenshots

https://community.multitheftauto.com/images/gallery/vehicleflagplate/9498.png ( this was an attempt to replace the carplate but can only change the carplate texture.

Version ALL

Additional context From mantis 8370.

MrSol0 avatar May 24 '19 15:05 MrSol0

Hey! Quite an old issue, but I've found the culprit: GTA locks the raster as soon as it's loaded (CCustomCarPlateMgr::Initialise). This explains why replacing it doesn't affect the displayed charset. Fixing it should be pretty easy (unlock old raster, relock new raster). I'll fix it in a few days, unless I forget about it, in which case, please remind me.

Note: Because GTA hardcoded the charset texture size you must use the same size as GTA does.

Edit: I think you can't see it in shader_tex_names because it's not on any world object, but I think its loaded all the time (so replacing it should be possible, its just that it has no effect)

Pirulax avatar Dec 31 '21 02:12 Pirulax

Hey reminder that u forgot this easy fix @Pirulax xD

Fernando-A-Rocha avatar Oct 16 '24 00:10 Fernando-A-Rocha