Forum
Questions, builds, help and the odd argument. The mods and guides are out front.
Nice 😃
Dude, you are AWESOME! :bow:
man that's awesome 😃 with that I can finally make one of my dreams in SLRR wheelie competitions 😛
# amilmand :
Almost there but as you found out (judging by the static cast to int) this function returns a float soo its no good for you the full call would be to get the address of the value and decode it as an int:RawEdit.getI(the_car.getIndexedAddr(Chassis.IndexedData_Flags));The clues would have been: LINK
And the comments in the chassis.java:public static final int IndexedData_GearNumber = 0x20FC-0x304; //this is an int getIndexedData will return strange but the RawEdit.getI with getIndexedAddr will suffice public static final int IndexedData_Flags = 0x70;//int
Thanks, I think that was what I needed. It's returning really weird values, though. It doesn't seem to be correctly changing when the turn signals turn on.
I dont know what your goal is with the flags but I found that access to this value is of a readonly manner as most of the flags the game updates each frame and invalidates any changes you try to force (though you can get interesting state indicators so to say, (whether the blinker is on, is the car running and some others)
The idea here is to program something like American turn signals, where a single red light is shared for the city, brake, and turn signal functions, and the light turns off entirely when the turn signals are on at the same time as the brake or city lights.
So basically, the pseudocode should go like this:
if flags & 1
if flags & 16
turn off brake light
otherwise
turn on brake light
if flags & 1
if flags & 16
turn off city light
otherwise
turn on city light
if !(flags & 1) && !(flags & 4)
if flags & 16
turn on brake light
But I can't quite get the flags to work.
By the way, is there a convenient way to display a glow object (or other render) aligned to a part, through Java, besides making it a whole separate part that can then be manipulated? I haven't figured this out yet. I have figured out how to display a render as a child of the part, but it always shows up at the center of the map. I can in fact make attachment parts for all of the glow objects, and then make them disappear under the map by moving their slot position, but I'd prefer not to do this if there is a more light-weight alternative (in terms of part count as well as not slowing down the game).
RedCarDriver wroteIt's returning really weird values
These are not the flags set in the cfgs those are lost upon loading of the cfg (or rather they are not loaded to memory so its impossible to manipulate them directly as of yet)
RedCarDriver wroteAmerican turn signals
I dont see a clear (reasonable) way to do this with the current setup.
RedCarDriver wroteglow object (or other render) aligned to a part
I only know of the way you described with making parts and slots a sophistication of the method would be to use the SetRenderType function of the Part class as to circumvent the actual attachment and detachment, or the slot movement and avoid suffering the flying glows upon flipping the car, also speed up the process somewhat.
The bad solution would be active monitoring and aligning the matrices but that is a horrendous idea.
Also there are some functions in the RenderRef class which you can try (I managed to change the color of the glow of a given (head)light but not of the projected texture) these are:
public native void setLight( int diffuse, int ambient, int specular );
public native void setFlare( ResourceRef glowtexture, int glowColor, float glowMinSize, float glowMaxSize, int flareCount, int rayCount );
So if you had detachable indicator and other lights(bulbs maybe) you probably would be able to make them do what you want but its getting complicated :/ (need to check if the parent-chassis has ignition and what not)
Bigg Boss93 wroteVibration
🙂
Alright, thanks. I was afraid it was going to be impossible to read the car's flags well enough to tell whether or not the headlights (or indicators, etc) are on. Thanks for the help, in any case.
I'm experiencing reproducible crashing if the cursor is on a menu button while the ReShade effects are loading. Is there a way to fix this?
Maybe, crash it with this: LINK
And tell me the faulting module(it should be d3d9.dll if its the slrr_gi.exe we may manage) and offset (if windows doesnt tell you off the bat in the error message try: LINK)
RedCarDriver wroteI was afraid it was going to be impossible to read the car's flags well enough to tell whether or not the headlights (or indicators, etc) are on
I missed this somehow well this is not entirely true you can check for whether the car thinks its night time (this is the same flag that gets checked by the lights) and check for the rpm if its >0 if so the lights are most probably on, there is also a flag for the indicators (but of course for that to actually get flipped the cruse mode needs to be on) and all this is read only as the game overwrites changes.
Code would look along the lines:
int flags = RawEdit.getI(GameLogic.player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags));
float rpm = GameLogic.player.car.chassis.getIndexedData(Chassis.IndexedData_RPM);
if((flags & 0x8) != 0 && rpm > 1)
{
//lights are most probably on
}
if((flags & 0x10000) != 0)
{
//left indicator blinking (mind you this is true for the whole time its in the blinking state not just when its actually lit)
}
if((flags & 0x20000) != 0)
{
/right indicator
}
But really you dont even need this, you can check for the steering with
getIndexedData(Chassis.IndexedData_CurrentSteering1) (the game does the same for the built in method)
for the indicators, (even enforce them when cruise mode is inactive).
And the current game time also can be acquired (the game checks for (currentTime < 75600 && currentTime >= 21600)) along with the rpm.
(and again the whole shabang for brake lights, IndexedData_BreakStrength, or clucth lights (if that is a thing) IndexedData_ClutchStrength ooor nitro lights IndexedData_NitroStrength and alot others)
# amilmand :
Maybe, crash it with this: LINK
And tell me the faulting module(it should be d3d9.dll if its the slrr_gi.exe we may manage) and offset (if windows doesnt tell you off the bat in the error message try: LINK)
Alright, I'll try that.
I missed this somehow well this is not entirely true you can check for whether the car thinks its night time (this is the same flag that gets checked by the lights) and check for the rpm if its >0 if so the lights are most probably on, there is also a flag for the indicators (but of course for that to actually get flipped the cruse mode needs to be on) and all this is read only as the game overwrites changes.
Code would look along the lines:int flags = RawEdit.getI(GameLogic.player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags)); float rpm = GameLogic.player.car.chassis.getIndexedData(Chassis.IndexedData_RPM); if((flags & 0x8) != 0 && rpm > 1) { //lights are most probably on } if((flags & 0x10000) != 0) { //left indicator blinking (mind you this is true for the whole time its in the blinking state not just when its actually lit) } if((flags & 0x20000) != 0) { /right indicator }
That's actually exactly what I wanted, thanks! I'll try that out. And yes, I did want it to happen only when cruise mode is on - I wanted the custom turn signals to come on at exactly the same times as existing SLRR turn signals, except with the changes necessary to make them behave like American signals.
Is it possible to run Exhaustive without reshade?
Shouldn't rely on it that heavily try and run it without the d3d9.dll (better to rename it though maybe sometime later youll need it, (or even better to just turn off some performance heavy effects GeneralShaderOverwrite ShadowShaderOverWrite and the like)).
Thanks man. I don't use reshade because my laptop is not good enough. I get too low fps even with all the features disabled
Is there any possible way to set part mass/weight by java? because I had an idea and I need to set weight by java to make it work.
Thanks in advance
Hey, sorry to bother you again, but do you have some idea what all of the variables in WheelRef.SetArm() and WheelRef.SetHub() do? The vast number of variables in there to test is intimidating. I figure "len" in there is probably length, but otherwise I have no idea.

