Hello guys, This is my first post so don't have high expectations. Yesterday, I got my learners. I wanted to make some L-plates for the Gavril Barstow to celebrate. However, i got a couple of problems. The camera bugs out when a load a map with this mod, and Paint.NET won't open DDS files when I tried to open the files. I tried to use Kolourpaint on an old machine running Linux, but Kolourpaint can read, but not write dds files , so that's why thy are PNG. I learned to do the glass skin mod from here: http://wiki.beamng.com/Glass_skin_tutorial except I did it for the Barstow rather than the Covet. Again, when I tried to load the mod, it won't work and the camera bugs when I load a map. Help would be very much appreciated. -SuperEmbracer
OK, here are a few things: Name your files and parts with your forum name, for example: barstow_skin_learners becomes SuperEmbracer_barstow_skin_learners. This will prevent conflicts with other mods which happen to add similarly named things. There will certainly be other mods which do, especially some of the 'big' skin/configuration mods! The display names don't have to include your name if you don't want... just unique filenames and part identifiers. You've packed your mod improperly. Your barstow folder should be inside a vehicles folder. So in other words you've currently got barstow/yourstuff when you should have vehicles/barstow/yourstuff instead. Your main problem is visible from the console. It's a jbeam typo. Check the console (press ~ on your keyboard) in order to see what's going on. Most/all of this information should also be saved in Documents\BeamNG.drive\beamng.log as well, so you can also check there. Sometimes the line number given in the log is relevant to debugging your own stuff, typically when writing Lua. In this case the line number isn't relevant to your jbeam. What is relevant is the first red colored (|E|) line after the jbeam loading done. It indicates what field the game tripped up on - this should give you the hint you need to find your typo!
Ok, thanks for the help, and I've packed the mod properly in the vehicles folder. I did not rename my parts with the forum name, as I am already having trouble with the mod. It is supposed to be part of a larger mod that I will upload in the future. I'm still having trouble. Like my driving, I am a beginner to Lua, so it will take me some time. And about the lua, I found the |E| after the "Jbeam Loading done". I can't find out the part where the game tripped up. There's several Jbeam loading dones in the logfile. After renaming the jbeam file name from skin_learners.jbeam to barstow_skin_learners.jbeam (which I assumed was the typo), the camera was still bugged. I hope the following will be of any use for the both of us, but however, in the game, I found a serious error with the Barstow. The included picture has the part name "barstow_skin_learners" as part of "Paint_design." I knew something's not right here.
Right, unless I misunderstand you the "serious error" you found is exactly what we're talking about here. Loading the vehicle crashed when it tried to index the contents of "information", which it unexpectedly found to be "nil" (that means "nothing", eg even less information than a zero). In your picture that's the first |E| which starts at 023.336. (eg right after the line "jbeam loading done" ) The typo you made is putting 'infornation' where you meant to type 'information'. The game attempts to look at the contents of information and finds it empty since all of the stuff you wanted to put in there is inside infornation instead. And as an important footnote - you are not "beginning at lua". Lua is a scripting language used by the game - you are mostly working with JBEAM (and/or JSON) which are markup languages or formats; as well as with images and assorted other markup formats (like materials.cs). Some mods do use Lua and you may in the future, but you're not using it now. The Lua you see mentioned in your log file is part of the game's way of ingesting your files. No harm, no foul - I'm simply correcting your misunderstanding / misuse of terminology.
Ok, I renamed "infornation" to "information". Thanks! It's now working. The camera is no longer bugged. However, I've still got an issue. The L-plates won't show up. Do i need to convert the PNG to a DDS? and if so, which program do i use? Or does it have to be under decals, rather than paint design. I don't have Photoshop, so that's ruled out. Here's the corrected Jbeam file for proof (as well as the next problem, sorry)
You should convert the PNG to DDS. Try using GIMP - it's much more powerful than Paint.net and is OSS / free-as-in-freedom (libre) as well (unlike Paint.net). If you don't plan to have Photoshop and you want to do things like this then learning GIMP is a must IMO. The image format your textures are stored in is not the problem though. This game / game engine can be very, very grammar/syntax sensitive. That's what you're running into here. Once again, the log file reveals all. Search your log for "learners" and you'll something similar to this: Code: 106.07219|D|Material::_mapMaterial|[Material::mapMaterial] - Cannot map unnamed Material - vehicles/barstow/learners/materials.cs 106.07222|D|Material::_mapMaterial|[Material::mapMaterial] - Cannot map unnamed Material - vehicles/barstow/learners/materials.cs 106.07225|D|Material::_mapMaterial|[Material::mapMaterial] - Cannot map unnamed Material - vehicles/barstow/learners/materials.cs 106.07228|D|Material::_mapMaterial|[Material::mapMaterial] - Cannot map unnamed Material - vehicles/barstow/learners/materials.cs "unnamed Material" is the subtle giveaway here. Take a look at your material declarations - you've neglected to use quotation marks. The guide you were following shows them. don't do this: singleton Material(barstow_glass_dmg.skin.learners) do this instead: singleton Material("barstow_glass_dmg.skin.learners") Be sure to check your log file in the future. Everything important doesn't show up as |E| or a special color. Visually checking the console (~) is great, but the log file is saved for a reason - using "Find" / "Search" within the log for names related to what you are doing can be revealing - as it was here.
Cool, it now works! Thank you so much! You need to see it for yourself! And, speaking of GIMP, I do use it quite a lot actually, it's just that when i use GIMP, It does not recognise the DDS files. I think it needs a plugin that can open DDS files. But anyway, here it is! It is going to be part of a larger mod that i will probably release tomorrow!. --- Post updated --- but one last thing; How do i make it a decal rather than part of the paint design?
You are welcome. I did see it myself of course. ;-) You'll have to research the decal question for yourself - I don't know the answer and can't help you find it at the moment.
Well, that's okay. I'll give you credit along with the textures in my upcoming mod. Speaking of credits, this is where i got the L plates from: https://en.wikipedia.org/wiki/Driving_licence_in_Australia#/media/File:LVic.png