Garry's Mod

Garry's Mod

[simfphys] Randy's Extra Functions
Alex Dec 20, 2022 @ 2:10am
Ways to improve this slightly.
I was looking at your script and the model for the plates. I saw that each digit on the generic plate bodygroups a specific digit (one position is for a letter, another for a number, etc.). For the L4D version, it's similar, but one of the numbers is changed to take letters instead.

Honestly, why not just make the standard plate universal? Just make any of the positions use letters OR numbers, and then when setting up the plate "group" file, the group defines what materials it uses for the text and background, and you can tell it which bodygroup to use for each position (either pick between letters, numbers, or either one)? This could also potentially allow for vanity plates too, since letters and numbers can be interchanged with each other.

That would make things work a lot better. That way if you want different lettering, letter textures or background, you can just tell it to swap mats and to tell it to use specific bodygroups, rather than making an entirely new model for each mat and for specific lettering. Also, maybe bring the digits closer to the plate so the floating is less noticeable.

And of course, if people want to make their own license plate models (say someone makes an HD model), they can define so in the plate group file to use that instead.

Another thing to bring up possibly is the ability to define the average time it takes for a car's ignition to start. If not defined in a vehicle's lua, it just takes the default amount of time. But if you've got, say, an older car, or an old beater (that's not actually "damaged"), you can tell it to take a longer amount of time to start. Also, some larger trucks and lorries might take a little longer in general to start. Or if you've got an electric car that turns on rapidly, or a high performance vehicle that starts quickly as well.
< >
Showing 1-15 of 22 comments
Randy  [developer] Dec 22, 2022 @ 10:54am 
the license plate model could definitely be changed to included numbers and letters in each slot, I think? I am actually not sure what the bodygroup limit is but I can try. The whole plate system is honestly a little too complex imo, but it was made with my ATS pack in mind and that NEEDs additional groups, because police cars have exempt plates for example.

It would be better to use a system like 3D text screens where it's just text put over the plate, but I am actually not smart enough to know how to code that, unfortunately.

As for the ignition times I am very likely gonna add this feature soon as it has been bugging me in a WIP pack too
Alex Dec 22, 2022 @ 2:03pm 
Yeah, you could use 3D text screens. I saw one that did something similar that used an image of a European plate, and text, but the problem with that it was unlit.

If you DID use 3D text or something, you would probably have to make it respond to light to behave more realistically, so it doesn't appear to glow.

There's also another thing, text tends to use kerning. This changes the spacing between letters to make words appear more consistent, and letters take up different amounts of space.

This means that letters and numbers won't appear in the exact same positions on the license plate, depending on what letters and numbers are used.

For example:
rs
as

R and A use different kerning and spacing, and despite being just two characters, the S is farther out to the right than the one next to R.

Unless you can still define specifically the exact position for each letter's placement, and do it that way.
Last edited by Alex; Dec 22, 2022 @ 2:04pm
Alex Dec 22, 2022 @ 2:06pm 
Also, about bodygroups:

Originally posted by Reverend V92 from Gamebanana:
$bodygroups page on the VDC.

Standard models: 4,294,967,296 combinations (32 bits)
Weapon view models: 256 (8 bits)

To calculate how many combinations you have, multiply the size of all your bodygroups together. The figure grows exponentially.
Randy  [developer] Dec 22, 2022 @ 11:24pm 
I think there should be a way to define spacing between letters, worst case scenario maybe I could define a specific attachment point for each letter.

Best way I can think of is using a separate model for each letter, but then that would spawn like 7 additional models with the vehicle per plate and I don't know if that's better or worse, mainly for servers

I'm gonna have to study how text screens does it, iirc they're open source
But then it'd be as simple as generating a random string and letting the end user set the material for the plate model and bam, way way simpleer system
Alex Dec 22, 2022 @ 11:54pm 
Originally posted by Randy:
I think there should be a way to define spacing between letters, worst case scenario maybe I could define a specific attachment point for each letter.

Best way I can think of is using a separate model for each letter, but then that would spawn like 7 additional models with the vehicle per plate and I don't know if that's better or worse, mainly for servers

I'm gonna have to study how text screens does it, iirc they're open source
But then it'd be as simple as generating a random string and letting the end user set the material for the plate model and bam, way way simpleer system
Do you know if GMod allows custom fonts, so you can use license plate fonts? And if there's a way to do it so that it reacts to light?
Randy  [developer] Dec 23, 2022 @ 12:18am 
I have no idea tbh, I've never messed with text
Alex Jan 1, 2023 @ 2:50pm 
Have you thought of adding gear shifting sounds from GTA IV to this pack? Maybe having a default set of them but then allowing cars to have their own shift sounds defined?
Randy  [developer] Jan 2, 2023 @ 1:26am 
possibly, i think next after some more netcode fixes is gonna be allowing cars to spawn with random amounts of fuel in their tank
HEλVYHλNDS6543 Jan 9, 2023 @ 9:44am 
do you have a way to add reversing sounds to vehicles?
Randy  [developer] Jan 9, 2023 @ 9:56am 
it's already in the addon
HEλVYHλNDS6543 Jan 9, 2023 @ 12:05pm 
Wow that's weird I never noticed thanks for replying
Alex Jan 26, 2023 @ 7:17pm 
Hmm... I wonder if there's a way to override a simfphys vehicle's steering wheel animation. It'd be cool to change a car's steering wheel lock-to-lock rotation for the steering wheel to provide a more realistic appearance.

You can already control bones with stuff like OnTick, that's how people get dashboard needles to work. They just have to set "SpeedoMax" to "0" so that the car's built-in acceleration animation from its Source vehicle form doesn't affect the animation.
Alex Jan 29, 2023 @ 8:04pm 
Randy, do you know if a model's steering animation can be "separately" controlled? Because I assume that a vehicle's steering animation moves both the wheels and the steering wheel, rather than the steering wheel and front wheels using isolated steer animations.

Is there anyway one could like... tell the steering wheel not to rotate in the animation, and then have the wheel be controlled separately via a script?
Alex Jan 29, 2023 @ 8:05pm 
Since vehicles have different bone names, the script by itself wouldn't do anything unless you define in the car's .lua file what the name of the bone is as well as what you want the lock-to-lock degrees to be. And possibly maybe also what axis for the bone to rotate on just in case.
HEλVYHλNDS6543 Feb 3, 2023 @ 10:47am 
Randy had an idea that this mod would be much more realistic, how about you put it so that when a player is in first person inside the car, the noise of the car engine is muffled as if he were listening to the engine inside the car to be more realistic
< >
Showing 1-15 of 22 comments
Per page: 1530 50