I’ve searched and searched and have not found an answer to this question. Mostly, I’d like to try an italic font or sometimes a block font.
Yes, I’ve gotten color change to work, and I’ve figured out how to turn it off, and I’ve studied the css etc., but I can’t figure out the nomenclature for how to change the font as well.
I enjoy your repaints, and would like the answer too.
Is that done by changing the colour somewhere in a texture? I couldn’t get the colour command to work in the aircraft.cfg file.
You can change the color in the panel.cfg file. Currently, the registration editing options don’t work from the aircraft.cfg file, at least up to the last time I tried to do that.
Check out my C-GMAP livery to see an example of changing the color with panel.cfg.
Had a bit of a play with this and was able to change the registration font. But the change applied to the rego of all aircraft even though it was only activated in the individual aircraft folder, so more investigation required.
Where did you change it?
It sounds like you did something in the OneStore directory, possibly in the Registration directory? I gave that only so you could see how panel.cfg’s are applied.
You would normally do it in a Community livery, like in my C-GMAP livery. In that way, it should only act on the single livery the panel.cfg file is associated with.
If you’re trying to mod a Premium or deluxe plane, I can’t help you. But there are Premium and Deluxe liveries out there. I haven’t gotten any to work, but, supposedly they do. (the couple I have tried just crash MSFS on me, and I haven’t tried again since).
I didn’t modify any MSFS files, just done with an entry in the aircraft folder inside the community folder.
I have managed to get it to give a coloured font in the font type required, and other aircraft are not affected as they were originally.
If you muck up just one step, it won’t work. I’ll have to get it straight in my head first and do some documentation. Basically it uses the information you provided, plus some extra I had worked out by trial and error.
The only issue is I think it won’t work with any modded aircraft, which I expect is the same issue with your rego colour change solution. I am guessing that the colour nominated in your panel.cfg file is ignored if you are using the C152X mod, but the font colour would work if you were only using the default C152. Or the C152X mod is ignored if your livery is loaded first. Basically because they both use a panel.cfg file for the same aircraft and MSFS will use the first one loaded. More testing required here.
I think you’re using an old version of the C152X mod. It’s up to .17, and there is a new branch now that has continued with more work. MSFS_C152 Community (V0.9.1!)
When he fixed the lights problem, he fixed the issue with the interfering panel.cfg. Properly written mods shouldn’t have an issue.
I already have version 0.9.1 of the C152. I only said I “thought” it wouldn’t work , which is why more testing was required. Have now found that while it works with the DA40 NGX mod on its own it definately doesn’t work if the G1000 project is in your community folder, (using DA40 NGX or not). You end up with a system slow down to 1FPS and nothing much happens after MSFS to load a flight. You have to terminate MSFS. Doesn’t cause a problem if the G3000 and GX mods are in the community, but that may be because my test aircraft uses the G1000. So may get similar problems using the font solution with an aircraft that uses the G300 or GX instruments.
Doing up some instructions now and will test them with your 152 repaint and the C152X mod.
Using a font called space age to test.
Have tested the changes with your aircraft and the C152X project mod installed and no issues with compatibility. Used an odd font and colour to highlight the change. No guarantees that the next patch won’t break it.
But this method is definately incompatible with the G1000 mod if you use it on any aircraft that uses the G1000. The correct font and colour appears in the hanger but the flight won’t load. No problem without the G1000 mod for the same aircraft. Have asked the G1000 people for advice.
It’s a lot of steps so should have some documentation in the next day or so.
Can I assume the Bi in your lingual is CSS?
I have documented some steps to allow you to use a different font colour and a different font on the aircraft registration. This is not for the unexperienced as even though I have used it a couple of times, it rarely works on the first go. There is plenty of scope for it not to work, usually typos or a missed file in the layout.json.
Accessing and using the sections below is done at your own discretion and risk, and with agreement that you will be solely responsible for any damage to your computer system or loss of data that results from such activities. When distributing a repaint after using this method you should also consider the licensing of individual fonts files in relation to their use and distribution.
Seems to still work after patch to version 184.108.40.206.
Step 1 can be done on its own without step 2 if you are just interested in the font colour. But step 2 needs step 1 to have been done first which is why it is also included here.
Step 1 - Set up and enable the Font Colour
Your repaint structure should look like something like this.
- Create a “PANELS” folder in the same location as your TEXTURE folder. Recommend you use same naming convention as TEXTURE folder.
- Copy contents of the panel folder from default MSFS aircraft to your new PANELS folder. Note: If your “community” and “asobo-liveries” folder s are on the same hard drive, make sure you copy the files, not move them. It’s also a good idea to copy the original files to another drive.
Depending on the aircraft you are repainting you might end up with just a “panel.cfg” file in this folder.
- Edit “panel.cfg” and add colour code. In the example the “008ce4” is the hex code and “0x” is added in place of the # usually used for hex colour codes. After change, save and exit.
- Edit aircraft.cfg and add panel folder identifier. After change, save and exit.
- Add panel folder details to ‘layout.json’ file in main repaint folder. Note: If the panel folder includes a ‘panel.xml’ file you will need to add that as well to the ‘layout.json’ file. Save and exit.
- Test in MSFS and confirm aircraft registration uses new colour. Don’t just test by using the hanger, as sometimes the hanger will look fine bu the flight won’t load with the aircraft. So make sure you test all the way to a flight, as this will highlight any conflict with other mods in your Community folder.
NOTE: Don’t proceed with step 2 until colour is showing correctly on aircraft registration in MSFS. Also if you only wanted to set up the font colour, then stop here.
Step 2 - Set up and enable the Font Type
Your repaint structure should look like something like this.
- Copy files the “VLivery” folder from “…\Official\OneStore\asobo-vliveries” or “…\Official\Steam\asobo-vliveries” your main repaint folder. Note: If your “community” and “asobo-liveries” folder s are on the same hard drive, make sure you copy the files, not move them.
- Create folder “Fonts” in the “htmi-ui” folder.
- Add your font .ttf file (true type) or .otf file (open type) to the “Fonts” folder you have just created.
- Add font details to layout.json file in main repaint folder.
- Now we need to rename the 3 files in the “\html_ui\Pages\VLivery\Liveries\Registration” folder. Use the same logic as used for your texture and panel folders.
- Now add a reference to the 3 new files in the layout.json file in your main repaint folder.
- Now go back to the registration folder and we are going to edit the 3 files. Any text editor will do for this job.
- Edit the .css file and add a new “@font-face” group of lines that point to your font just below the other existing @ font-face lines. Give the font face a unique name, I just use the actual font name but anything will do. Make sure you enter either “trutype” for fonts ending in .tts or “opentype” for fonts ending in .otf.
- Scroll down to the bottom and substitute your new @font name in place of “Font-Bold” in the “font-family: Font-Bold;” line. Exit and save.
- Now edit the .js file and scroll right to the bottom. On the last line you need to change the line “//# sourceMappingURL=Registration.js.map” to reflect the new name of the .js file. Then save and exit.
- Now edit the .html file and update the first line to reflect the new name of the .css file. Then edit the last line to reflect the new name of the .js file. Then save and exit.
- Now go back to your PANELS folder and edit the “panel.cfg file and change the registration reference to reflect the new html filename done in step 5 above. Then save and exit.
- Now test in MSFS and if you have done everything correctly only your new aircraft should use the new font and new font colour.
Issues and Troubleshooting
- If your aircraft doesn’t show up in MSFS, then you most likely :-
- Have missed updating one of the entries,
- Be missing a file or folder,
- Be missing an entry in the “layout.json” file.
- have made a typo somewhere. Many of the changes require a reference to a previous step, so a typo can bring the chain of sequences to a stop.
- If get the flight load stalling just as you get to the ready to fly screen, it may be a conflict issue with a mod like the G1000 mod. Most likely fixed by making sure your loading order in the community folder is any repaints loads first before any aircraft mods (eg DA40 NGX). Then aircraft mods (eg DA40 NGX) loads before instrument mods (eg G1000 project). MSFS loads Community folder mods alphabetically.
- If you end up with a coloured rectangle where the rego should be then you most likely have used a “panel.cfg” file from a different aircraft to the one you have repainted. Some aircraft have both and inside and an outside rego command, while others only have an outside rego command. Using a panel.cfg with both insde and outside regos on an aircraft without this feature causes this problem.
- Colour of the registartion doesn’t exactly match the colour you have used in the ‘panel.cfg’ file. Sorry this is just a limitation of using this method. I found that selecting red will result with a rego number more like a burgundy colour, and I think this varies across different aircraft. There is no documentation on how this all works from Asobo so it is not celar why the colour changes.
- Using italic fonts will most likely not work as MSFS uses the same exact font on both sides of the aircraft. So an italic font will look OK on the left side where is would slope backwards, but slope forwards on the right side. Real aircarft using an italic font slope backwards on both the left and right side of the aircraft.
- Using this method for large releases like the livery megapack, would mean that you may duplicate some steps for different aircraft if they use the same font. I think you could get around this by creating a single registration font mod that loads before any repaint aircraft. The only change then required to the aircraft repaint itself is only in creating and editing the panel.cfg and adding the panel.cfg to the layout.json. Only theory but I am pretty sure it would work.
- MSFS has its own installed fonts separate from Windows. If you want to use any of those fonts, then steps 2, 3 & 4 of part 2 can be omitted and you can just use the .ttf file name in step 8.
Default Fonts Available
Be worth noting that the PANEL.cfg and panel.xml have to be added into your layout.json at stage 1 to get it to work as well. The entries can be found in the original layout.json and then copied into your own and folders renames to match the locations like the texture ones.
Great job, a lot of my paints are white and needed different colour registration to stand out. Thanks.
Thanks, I’ll update the instructions when I get a chance.
Edit - guide updated.
BTW, where mods are conflicting, this is why I keep saying that Asobo hasn’t given us a fully understandable guide as to how to create a mod. Some mods conflict, others don’t, but I have not yet found a completely consistent, understandable way to set up a package so it is of and unto itself.
Btw, that’s why they name their mods working title, so they are read in last. Last mod read trumps previous mods in alphabetical order.
But there are ways to set up dependencies and naming conventions across the manifest, layout, directory naming conventions, and code in the xxx.cfg files to make mods independent of each other. Hence, my panel.cfg does not interfere with latest C152 mods. and it did at the .15 version of C152X because he rewrote the electrical system, but didn’t do it cleanly.
Are you sure it is last mods trump earlier mods? I though it was the other way round, where what is loaded first gets kept. I always load the G1000 before any aircraft that use it.
Not according to the G1000 mod folk.