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
Snowyy
(@snowyy_24467)
Honorable Member
Joined: 10 years ago
Posts: 551
 

Hi amilmand, I am experiencing a weird bug/feature (not sure lol) which makes it impossible to quick repair the car/open it's dorrs when outside of the garage. Is there a way to fux this? I am using your reshadepack for MWM simply because it makes my game finally somewhat decent looking. Thanks



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

I do not use these features though I did not remove them intentionally (I think you have to activate cheat mode for them to be available but I dont know how thats done either)
I think BB's pack has them tested (and more of these screenshot related features) he also was kind enough to adopt my modifications to his track implementation try using his with a version based on his game rather than pure MWM but I dont know you can try it on MWM it might work I skimmed through the script I didn't find anything standing out to be incompatible with MWM but I might be wrong.
LINK



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

# amilmand :
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.

I've tried the setvel but what actually i need is something more "simple": basically i need something that limits the car speed, like the cruise control in valo city, but working for all tracks
Setting the throttle strength kinda worked but not as expected



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

i need is something more "simple"

Sadly I dont know of a simpler method :/
For the AI cars you can use a spline in an spl and the followSplineTrack function with that you can limit the speed and set the route.
For the player as of yet you will need an active monitor to enforce the speed limit.
The cruise control uses data from the .trc file maybe you can take a look at the decoder and the decoded city.trc as you seem to have motivation.



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

I've used the following "script":

if (playerspeed>80)
{
	RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_ThrottleStrength),0.0);
	RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_BreakStrength),1.0);
}

it keeps the car near to the designated speed, but sometimes the car speed slowly increase (and also the car engine sounds weird).

Limiting the speed in the spl would help me too (i had read about it sometime ago, but cant remember where(and also i cant remember the correct "syntax" for spl files))



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

oh we have the spl syntax in the endnotes of the article (LINK)here is the relevant part:

  The .spl file spline row format (%LF is float %d is int) is:
  (%lf %lf %lf) (%lf %lf %lf) %lf %lf %d %lf %lf %d:
  (pos XYZ), (normal XYZ), splineWidth, targetVelocity, I do not know the rest
  the two ints are used as bools
  the list of first two vectors define a closed cubic Hermite spline.

I have posted a program before that can be used to create spl files so the syntax is not directly useful (though this program was not made for general use it is functional)
(originally I made this to define the tournament tracks so there is functionality that is not needed for simple spl generation)
Spls as I mentioned in the article must be closed and this program enforces that and it generates the normals for the control points.
For spl creation you should click Render select the rpk of the map you want to define the spl for.
After it loads select the Marker from the list, you can move around the marker with the middle mouse button held down rotate the camera with the other buttons, if you have the left shift held down the marker will move up/down
The AddSpl button loads an spl file already saved.
Del deletes the closest control point to the marker.
AddNodeAtMarker will add a control point at the marker (keep in mind we are defining a closed spline)
Snap will snap the closest control point to the marker.
SaveSpl is evident.
DuplicateNode will copy and slightly move the closest control point to the marker.
GenAllNorms is not needed the normals will be generated upon saving regardless.
RndSpl will randomize the position of the control points a little.
You can also directly edit the properties of a control point with the text boxes.
MarkStart and MarkFinish are for the tournament definition.
The other controls are for other modes of editing (this program can be used to modify(on a very low level) the map vertices and phys objects by selecting a "different" file extension in the openfiledialog)
Here is a link to the program.
LINK
I must emphasise that this was made for a direct purpose (defining the tournaments in slrrexhaustive) and its code is terrible more of a test or a proof of concept I really wouldn't want to extend this program further before refactoring (nevertheless the source code is available from the SlrrExhaustive main download)
the program needs the .net framework 4.5.2



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

# amilmand :
I must emphasise that this was made for a direct purpose (defining the tournaments in slrrexhaustive) and its code is terrible more of a test or a proof of concept I really wouldn't want to extend this program further before refactoring (nevertheless the source code is available from the SlrrExhaustive main download)
the program needs the .net framework 4.5.2

Still a very powerful tool, thank you 😃



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

I found a way to set the speed limit for the cruise mode luckily it is set in the AI part of a vehicle which is relatively easy to access here are some lines that can be used to engage the cruise mode and set the speed limit for a given car:

public static final int IndexedData_Flags = 0x70; //these should go in the chassis.java 
public static final int IndexedData_SpeedLimit = 0x2104;
...
int flags = RawEdit.getI(player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags));//these should go where you want to set the limit
flags |= 0x1000;//this sets the cruise mode on to set it to off this line should be flags &= 0xFFFFEFFF
RawEdit.setI(player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags),flags);
RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_SpeedLimit),1.0);

this 1.0 will be the speed limit mind you this is not in kph or anything related its in some arbitrary unit, 13.33 is the fall back value so this 13 should be some theoretical maximum you would need to play with the values to find an optimum. (1.0 is around 5-10 kph)

Added 1 minute later:

I mean this will work on tracks that do not define their trc file I did not test it in Valocity but I would presume the original values in the trc file will overwrite direct manipulation with the RawEdit class.



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

I tried it out the AI cars will stick to the limit set in this way when they are following a spline, and for the player's car (I only tested the player's) the limit will not get overwritten in valocity.



   
ReplyQuote
gorgoil
(@gorgoil_3248)
Member Moderator
Joined: 14 years ago
Posts: 219
 

# amilmand :
I found a way to set the speed limit for the cruise mode luckily it is set in the AI part of a vehicle which is relatively easy to access here are some lines that can be used to engage the cruise mode and set the speed limit for a given car:

public static final int IndexedData_Flags = 0x70; //these should go in the chassis.java 
public static final int IndexedData_SpeedLimit = 0x2104;
...
int flags = RawEdit.getI(player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags));//these should go where you want to set the limit
flags |= 0x1000;//this sets the cruise mode on to set it to off this line should be flags &= 0xFFFFEFFF
RawEdit.setI(player.car.chassis.getIndexedAddr(Chassis.IndexedData_Flags),flags);
RawEdit.setF(player.car.chassis.getIndexedAddr(Chassis.IndexedData_SpeedLimit),1.0);

this 1.0 will be the speed limit mind you this is not in kph or anything related its in some arbitrary unit, 13.33 is the fall back value so this 13 should be some theoretical maximum you would need to play with the values to find an optimum. (1.0 is around 5-10 kph)

Added 1 minute later:

I mean this will work on tracks that do not define their trc file I did not test it in Valocity but I would presume the original values in the trc file will overwrite direct manipulation with the RawEdit class.

this is really useful 😃
I've figured 1 is around 3.3km/h, and 20 sets the speed limit at 62km/h, this will help me with an idea I had a year ago 😃 I didn't made that idea because I needed to have a way to set speed limit 😃



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

I improved the cruise behaviour a little I added a break factor to the cruise mode when the car is travelling faster than the limit it will brake by that amount this is a global value at the address 0x618034 the default value is 0.5 (this value will overwrite the players input if the car is going faster than the limit so 0.0 is inadvisable) there is a way now to disable the automatic steering of the cruise control (globally again) int at the address 0x618038 default value 0 (not disabled) these values can be accessed from the reshade config and also from the RawEdit class.
I updated the links of SlrrExhaustive Bits



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

awesome :awesome:



   
ReplyQuote
Runaeh
(@runaeh_11638)
Estimable Member
Joined: 12 years ago
Posts: 130
 

how about a "wheel" mode where you can insert buttons for each gear so we can use a h-pattern shifter like a g27, then switchable so when not on you have the standard up and downshift buttons ? 😉



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

I dont have the hardware, the groundwork is done someone with access to proper testing environment should be the one to do this.
If you do then jump on it surely people will love the mod 🙂



   
ReplyQuote
gorgoil
(@gorgoil_3248)
Member Moderator
Joined: 14 years ago
Posts: 219
 

# Runaeh :
how about a "wheel" mode where you can insert buttons for each gear so we can use a h-pattern shifter like a g27, then switchable so when not on you have the standard up and downshift buttons ? 😉

that's already on progress



   
ReplyQuote
Page 15 / 36
Share: