Conversation
|
It's been brought to my attention that the existing tach types are relied on as a visual indicator for when a gear shift is about to happen. Something like this would include that functionality. if (rpm <= Setting_Gearbox_Downshift && gear >= 2) {
color = Setting_Gearbox_LowRPMColor;
} else if (rpm >= Setting_Gearbox_Upshift && gear <= 4) {
color = Setting_Gearbox_HighRPMColor;
}If we include this change we might want to use Trackmania_2025-11-15_12-41-55.webm |
|
Thanks for the PR! I can't playback the videos on my Mac for some reason, but I will take a look at this soon. |
|
Yw! I replaced the mp4s with webms, maybe that helps? |
|
Hi, hate to bump but did you ever get a chance to look at this 👉👈 |
|
Sorry I forgot! I'll try to take a look today. |
codecat
left a comment
There was a problem hiding this comment.
Thanks for the work so far! Looks clean enough, but needs support for Maniaplanet and Turbo.
Source/Things/Gearbox.as
Outdated
| float spaceForPadding = lightPadding * 6.0; | ||
| float lightSize = (size.x - spaceForPadding) / 5.0; | ||
|
|
||
| for (uint i = 0; i < 5; i++) { |
There was a problem hiding this comment.
There are more than 5 gears in Maniaplanet and Turbo cars, so we should support that too.
There was a problem hiding this comment.
Do all cars in mp4 have 7, and all cars in turbo have 9? I don't own these games so I can't test it
There was a problem hiding this comment.
Oh you're right, it may indeed be a bit different for the non-Stadium cars :( You may have to look at the current car model the player is driving.
Arguably this may also be something to look at the the non-Stadium cars in Trackmania - I'm not sure about those gearboxes.
There was a problem hiding this comment.
VehicleState is telling me all the tm2020 cars have 5 gears. Zai on the TM discord tells me for tm2
canyon valley lagoon traffic have 7
the rest have 5
but VehicleState::GetVehicleType is only implemented in tm2020. Supposing it can be added for other games it should be a pretty simple fix over here. Still don't know about turbo
There was a problem hiding this comment.
Good call. I'll take a quick look at this tonight and get back to this. 👍
|
Went ahead and added the low/high RPM colors behind a setting. Also now uses gear colors if they're enabled (instead of having a second separate checkbox). Reworded the settings to reflect that |
Correct padding and light size
codecat
left a comment
There was a problem hiding this comment.
Thanks for the fixes! We'll indeed need to look at the other cars on Maniaplanet. Other than that, there's a small style fix.
Source/Things/Gearbox.as
Outdated
| #if MP4 | ||
| const uint MAX_GEAR = 7; | ||
| #elif TURBO | ||
| const uint MAX_GEAR = 9; | ||
| #else | ||
| const uint MAX_GEAR = 5; | ||
| #endif |
There was a problem hiding this comment.
This constant is only used when GearboxTachometerStyle::Lights is used, so to keep the global scope clean you can move this (as a regular variable) into that same switch case.
It could then probably also be named lightCount rather than "max gear", which may be a bit clearer in its purpose/intent?
Source/Things/Gearbox.as
Outdated
| float spaceForPadding = lightPadding * 6.0; | ||
| float lightSize = (size.x - spaceForPadding) / 5.0; | ||
|
|
||
| for (uint i = 0; i < 5; i++) { |
There was a problem hiding this comment.
Oh you're right, it may indeed be a bit different for the non-Stadium cars :( You may have to look at the current car model the player is driving.
Arguably this may also be something to look at the the non-Stadium cars in Trackmania - I'm not sure about those gearboxes.
Hello! This is intended to emulate the gear lights on the back of the car. I think this is a little easier to parse than the gear number text. In the future it might be worth copying how car status (turbo, cruise control, etc) change the gear lights.
Trackmania_2025-11-13_16-00-33.online-video-cutter.com.webm