VStanced/mods
Submit a mod
Mods Guides Forum Submit a mod Log in Register

Forum

Questions, builds, help and the odd argument. The mods and guides are out front.

Notifications
Clear all

Amilmand WIP

526 Posts
57 Users
0 Reactions
282.9 K Views
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  

WearMultEngine=1.000000 means you will get 1% of the damage to the engine from wear than you would have gotten by default
(not from collision that is CarPartDetachmentMult) you probably want it to be 0.0
WearMultTyre=0.070000 means you will get 7% damage to the tyres from wear (you probably want it higher even 1.0 isn't that fast (the original slrr setting)) (yes the other is actual percents this is a multiplier)
(but you can edit these on the fly in reshade for example if you really want to damage the tyres to a certain amount as a workaround you can set the WearMultTyre to some obscene amount 100 or the like (you can set any value by doubleclicking (might need a few tries it isn't that reliable) on the slider control in the reshade config menu)) damage them as you like then set it to 0 to keep them that way.

Also cfg_deformation=0.500000 halves every damage applied from collisions and I'm not sure if wear factors this in or not but it is possible so please keep it 1.0 for now

Is this all the settings present in the ini?
this should be the whole list: (not an example of settings you should use just a list)

ThrottleOnInAutoShiftDeadTime=0.500000
DynamicReflection=1.000000
CarPartDetachmentMult=0.110000
ReflectionStrengthOverride=1.000000
Reflection_A=1.000000
SpecularOverrideEnabled=1.000000
SpecularPower=347.000031
Reflection_B=0.400000
Reflection_R=0.400000
Reflection_G=0.400000
ReflectionTexCoordOverrideType=3.000000
ReflectionColorOpOverrideType=25.000002
SpecularColorPower=1.500000
cfg_mem_texture_min=40.000000
EarlyExitUnloadLoadThreshold=0.000000
SoftwareFrustrumCullReturnOverwrite=4.000000
CarDeformationOnCollisionMult=0.300000
CarChassisDeformationOnCollisionMult=0.000000
AISlideIgnoreMod=472.000000
DisableFlop=1.000000
cfg_mem_sound_max=0.000000
TrafficFlatBonus=-0.130000
MXAOBehindSmoke=1.000000
cfg_mem_texture_current=84.000000
WearMultEngine=5.000000
WearMultTyre=100.000000
DisableRenderRefCleanUp=1.000000
cfg_deformation=1.000000
cfg_engine_inertia_factor=32.000000
cfg_external_damage=0.250000
cfg_internal_damage=1.000000
DynamicReflection_DownsampleFactor=1.000000
cfg_mem_instance_current=2794.000000
cfg_mem_instance_max=3000.000244
cfg_mem_instance_min=2000.000000
cfg_mem_sound_min=12.000000
cfg_mem_vertex_current=5.000000
cfg_mem_texture_max=1500.000122
cfg_mem_vertex_max=1000.000000
cfg_mem_vertex_min=16.000000
cfg_particle_density=1.000000
cfg_skidmarks_max=8200.000000
resource_loadrate=15.000000
AIOverBreaking=10.000000
AIOverSteering=1.050000
AIOverThrotlling=1.100000
TrafficDummyRacerWheelSizeLimit=0.700000
TrafficFlatValueForLimitedWheelSizes=-0.350000
ClutchOnInAutoShiftDeadTime=0.500000
DynamicReflection_HaltAfterFirstReflectingSurface=1.000000
ForceNonDynamicReflectionIndex=0.000000


   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  
Bigg Boss93 wrote

kinda like a tennis balls machine

There is a setvel command in Slrr with a format of "%*s %f,%f,%f,%f,%f,%f" the first three floats are the new velocity of the object (preferably a car(vehicle)) the last three are the new ypr and sadly not angular velocity.
example:

player.car.command( "setvel 0, 10, 0, 0, 0, 0" );

I pushed an update to the reshade packs (SlrrExhaustive Bits) reintroducing the ability to select from predefined environment maps (reshadeFx\Textures\env_maps) and adding some physics related realtime-tweakable (these offsets can be used with the RawEdit class to set global phys properties like gravity) variables:

006186E4 -> gravity (-9.806650)
006186EC -> Collision Force mult for map objects 1 (1.0)
006186F0 -> Collision Force mult for map objects 2 (1.0)
006186F4 -> Collision Force mult for vehicle 1 (1.0)
006186F8 -> Collision Force mult for vehicle 2 (1.0)
006186FC -> Collision Force mult for vehicle 3 (1.0)
00618700 -> Collision Force mult for vehicle 4 (1.0)

00618710 -> WheelFrictionMult
00617FC4 -> WheelFrictionXMult
00617FC8 -> WheelSilictionMult

00618000 -> WheelStiffnessMult
00618004 -> WheelRollResMult
00618008 -> WheelBearingMult
0061800C -> WheelMaxLoadMult
00618010 -> WheelLoadSmoothMult
00618014 -> NativeSpring_Var1 (hardness)
00618018 -> NativeSpring_Var2 (inverse-rebound)
0061801C -> NativeSpring_Var3 (inbound inverse-softness)
00618020 -> NativeSpring_Var4 (length and bumpiness)
00618024 -> NativeSpring_Var5 (max inverse-contraction)
00618028 -> NativeSpring_Var6 (collision realted)
0061802C -> NativeSpring_Var8 (spring length)

I also added a function to the SfxTable (sparking from adnan54's idea) class which can be used to retrieve the base address of the added sound and with that one can modify the properties of the sound without calling addItem repeatedly, in a more performant manner.

public native int AddItemPtr( ResourceRef sfx, float pitch, float pmin, float pmax, float vmin, float vmax );
//these are surely valid offsets (from soundBaseOffset=AddItemPtr(..)):
//RawEdit.setF(soundBaseOffset+0x10,1.0/*new_pitch*);
//RawEdit.setF(soundBaseOffset+0x14,*unkown*);
//RawEdit.setF(soundBaseOffset+0x18,*unkown*);
//RawEdit.setF(soundBaseOffset+0x1C,*unkown*);
//RawEdit.setF(soundBaseOffset+0x20,*unkown*);

I added a function to the RawEdit class

static native int CentCur(int notUsed);

which centers the cursor on the client window as per the request of tothbence for his underconstruction first person garage mod thing (LINK)

I uploaded a deeply improved version of SlrrExhaustive I drastically decreased the number of scripts potentially loaded and this should greatly extend playability I also revamped the mass of all the cars and made them stable in the air but these changes break backwards compatibility with save files so I uploaded this version to a new link and I will update the download page (LINK) aswell. Further reason to keep the old one is that the changes are not conform with popular opinion; the game become less realistic (though the new changes that one can make by tweaking the phys variables can counteract this), and this is less tested, nevertheless I think it is a quality of life improvement.
I also made sure every car has proper head tail and break lights, and added some additional content (new cars and some engines) but I can now say with utmost certainty that this is the maximum number of rpks that can be loaded.
I already mentioned this in a previous post but;
the game considers every unique rpk reference (pointing to a unique rpk) be it an external ref in an rpk or a script-reference to be.. well.. unique and reserves an index for them from a pool of 256, this also includes rpks that are not present where they are expected, and RefID-s that are refrenced directly as integers and not with the rpk reference syntax (test.rpk:0x0001r) are each considered to be part of a new unique rpk and they also get an index from the 256 there are two such references in the base game GameRef.WORLDTREEROOT and GameRef.WORLDTREELEAF so the maximum valid rpks that can be loaded is actually 254 and this version of the game loads just as many.

As for breaking backwards compatibility I merged rpks containing muffler tyre and rim definitions so one can make the saves compatible by removing these parts from the car before downloading the new archive.

From now on I will only update the patchlink for the new SlrrExhaustive (LINK) and leave the old one as it is.



   
ReplyQuote
Bigg_Boss93
(@bigg_boss93_1370)
Member Admin
Joined: 15 years ago
Posts: 3835
 

Omg that stuff's retarded, love it!

Not sure about the latter, what is it about? You're using sounds from other scripted engines?



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  
Bigg Boss93 wrote

the latter

The original idea of adnan54 was to make the pitch of the turbo whine dependent on the cars rpm and for that he tried to call addItem on the SfxTable repeatedly in an animate block or the like but this crashes the game unsurprisingly.
This is a way to modify the additional parameters of a sound added to an SfxTable much more frequently (every frame if needs be) this way one can implement the original idea. The test just uses a variable changing every (I think) 10ms to overwrite the pitch of every sound in the given SfxTable as a demonstration.



   
ReplyQuote
RedCarDriver
(@redcardriver_1155)
Member Moderator
Joined: 15 years ago
Posts: 1125
 

Thank you so much for your hard work, Amilmand!

Another question: Would it be feasible to write a function to queue a gear change into a specific gear, to make it possible to use a shifter controller (e.g. on the Logitech G27) to shift into specific gears?



   
ReplyQuote
Lagano
(@lagano_19398)
Noble Member
Joined: 11 years ago
Posts: 1731
 

# RedCarDriver :
Another question: Would it be feasible to write a function to queue a gear change into a specific gear, to make it possible to use a shifter controller (e.g. on the Logitech G27) to shift into specific gears?

^ I wanted this for a long time! I'm sure you guys can figure something out 😃



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  

It can be done with some limitations as always, I added a new function to the chassis.class

public native int getIndexedAddr( int index );

which acts similar to the getIndexedData but instead of returning the data as float pointed by the offset it returns the offset this coupled with the address of the current gear as an int which is the gear ratio + 0x20 or

public static final int IndexedData_GearNumber = 0x20FC-0x304;

is enough to set the gear to a specific hmm gear the numbering goes as expected but the R is 7.

With an example call of

RawEdit.setI(player.car.chassis.getIndexedAddr(Chassis.IndexedData_GearNumber),4);

the result is:

(mind you I have the ThrottleOnInAutoShiftDeadTime at 1.0 that is why the original shifting results in some throttling this also exemplifies that ofcourse there is some difference in setting the gear like this and through the "controller" (the ingame class not the peripheral) and this can be a limitation there will be no dead time just an instant shift)
If the car is set to automatic in the settings the game will overwrite the changes made to this offset.

I updated the files under the links of SlrrExhaustive Bits
(including the AdditionalChassisFunctions.txt)



   
ReplyQuote
holeecrab
(@holeecrab_12721)
Honorable Member
Joined: 12 years ago
Posts: 709
 

Pardon my stupidity, but is the thing you did right now was to imitate how clutch kick works irl?



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  

Well I dont really know how "clutch kick"-ing works :/ taking the def from this post (LINK) no, I mean the engine will not rev up it is more like you change the gear really fast like lightning fast so the ratio changes but the rpm stays exactly the same as in the previous gear, but this is as of yet just a potential mod, I only did the groundwork, didn't change gameplay in any way.

Added 2 minutes later:

Thinking about it the clutch kicking is already in the game if you have the ThrottleOnInAutoShiftDeadTime at 1 and the ClutchOnInAutoShiftDeadTime at 0 this will mean that when you change the gear the clutch wont be pressed but the throttle will be floored



   
ReplyQuote
Bigg_Boss93
(@bigg_boss93_1370)
Member Admin
Joined: 15 years ago
Posts: 3835
 

The last time i checked, clutch kicking has nothing to share with shifting, you literally give a kick to the clutch while accelerating so that the engine does momentarily overrev and, once the clutch has stopped the frictioning moment, and thus is stuck back to the flywheel, the car will have a kind of "boost" effect, the wheels will start spinning and thus, on an rwd, help you getting sideways.

You can do this in sl by its own, no need to edit anything, just have to make sure you're at the right rpm before... kicking.



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  
gorgoil wrote

just a question is there a way you can script a trigger in box aspect instead of radial aspect like SLRR does?

This was quite some time ago but I found out that there is a box trigger "natively" in the game check the source of the Trigger class there is a constructor for it:

public Trigger( GameRef parent, GameRef type, Vector3 pos, float x, float y, float z, String alias)
{
	if( type == null )
		type = new GameRef( DEFAULT );
        trigger = new GameRef(parent, type.id(), pos.toString() +",0,0,0,box,"+ x +","+ y +","+ z, alias);
}

Added 30 minutes later:

Oh and I'm fairly certain that the 3 zeros following the position are the ypr rotation coordinates.

trigger = new GameRef(parent, type.id(), pos.toString() +",y,p,r,box,"+ x +","+ y +","+ z, alias);

So someone can make box triggers with 9 degrees of freedom if needs be.

Added 1 hour 23 minutes later:

Here is a function for ease of use (this can be used with the addTrigger function of the track class with the signature:

public Trigger addTrigger( Trigger t, Vector3 pos, RenderRef marker, String handler )

)

public Trigger MakeBoxTrigger( GameRef parent, GameRef type,
  Vector3 pos, float x, float y, float z,
  float yaw, float pitch,float roll, String alias)
{
  Trigger ret = new Trigger(parent,type,pos,alias);
  ret.trigger.destroy();
  ret.trigger=null;
  if( type == null )
    type = new GameRef( system:0x00000034r );
  ret.trigger = new GameRef(parent, type.id(), pos.toString() +","+yaw+","+pitch+","+roll+",box,"+ x +","+ y +","+ z, alias);
  return ret;
}


   
ReplyQuote
GolfPlaya
(@golfplaya_3739)
Active Member
Joined: 14 years ago
Posts: 8
 

Hey Guys
I'm new to this whole scripting thing. Wanted to find out how to put pure sound packs for engines
/d/4701-pure-sound-nissan-pack
/d/4711-pure-sound-bmw-pack

Normally just add text lines to the java yet it crashes when I try

Or is it easier to put sounds and select them via chassis can someone show me how :/
Game play is awesome I would love to have some good engine sounds for all those engines



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  

Thanks for the links yes I think the most reasonable way would be to add them to the chassis' sound overwrite functionality I will try to merge it and add it to the patch.

Added 1 hour 44 minutes later:

I updated the file under the patch link to include the additional sound overwrites.
(SlrrExhaustive Patch Link)



   
ReplyQuote
adnan54
(@adnan54_2457)
Reputable Member
Joined: 14 years ago
Posts: 252
 

I was wondering if it is possible to set the player car (and bot car aswell) speed and rpm using the RawEdit.setF method? It would help a lot 😃



   
ReplyQuote
amilmand
(@amilmand_18634)
Reputable Member
Joined: 11 years ago
Posts: 259
Topic starter  

The speed can be set by the setvel command detailed and exemplified on the previous page LINK
The rpm will be conform with the new velocity if the tyres got traction.
Though setting the rpm directly will not work because the game-engine will overwrite the data you force on it.

However you can simulate the behaviour by setting the throttle strength with a script like:

RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_ThrottleStrength),10);

mind you this value is supposed to be in the range of [0-1] nevertheless the game accepts and handles extreme values relatively well (setting it to some obscene amount will brake the engine for example, but if you set it to like 10 the engine wont brake it will just simulate the possibility that you can press the throttle actually through the floor if this makes sense)

But this value again will be overwritten by the engine the next frame but will fall of from where you set it so if you set the throttle value the engine will rev up and rev down normally as if you released the pedal, you would need to set this actively (every frame or similarly) to simulate a pressed state but I think that is logical.



   
ReplyQuote
Page 14 / 36
Share: