Excellent. By the way, Adnan, can you help me with something. There aren't many parts available in the VS EK9 mod, and I noticed you had a single piece civic. Could you export the bumpers in the correct scale for me to .scx with paintability?
Roleplay: A engine Builder and tuner that lives in Japan and Builds cool stuff.
Cars: Corolla Levin coupe Tog/show car
180SX s13 350hp SR20DET 6MT Babe 1
Supra Sz JZA80 2jz-Gte Vvt-i 2000's Hotboi
240sx Vert HOTBOI 2
#skip :
They look really nice btw, extreme qualitea
All credits goes to LossTunes tho, i have only made few changes xD
#Jfernando1 :
Excellent. By the way, Adnan, can you help me with something. There aren't many parts available in the VS EK9 mod, and I noticed you had a single piece civic. Could you export the bumpers in the correct scale for me to .scx with paintability?
Thanks.
I don't know if it will be possible since i don't know the correct scale and materials from VS EK9
You can just use Zmod to import the bumper that's already there, scale it by 9850 in 3Ds Max, and then match the scale on the single piece. Also you can use whatever materials you have.
Added 1 minute later:
Scaling by 9850 after importing through Zmod into Max, gives you the original size. So scale up or down the single piece until perfect or near. Then separate the bumpers off.
Ask JoeAlex for the materials and scale reference. He did some parts for the EK9 back in the day.
Alternatively, I have Edd's materials from his BMW E92 back when I made quarter-panels.
#Jfernando1 :
Scaling by 9850 after importing through Zmod into Max, gives you the original size. So scale up or down the single piece until perfect or near. Then separate the bumpers off.
Roleplay set roughly in a fictionalized version of Phoenix, Arizona. The time varies, with a lot of flashbacks / stories told through old photos as well as flash forwards to later times, but is intended to be one continuous story. My character is about 5 years older than myself, and considerably richer. lol. I have a couple of other made-up characters for the RP too.
Current cars:
- Nissan Skyline GT-R V-Spec (BCNR33 1996 S2)
- Toyota Supra (JZA80 1993) - auto N/A; work in progress
Will the R33 ever be released? When? : The R33 is a long running work in progress that will be released when it's done, and not a moment sooner. I'm definitely being a perfectionist about this, but I want this to be the mod the community deserves and expects, not merely the latest in a set of stop-gap mods.
Will you be making a Mustang 2015 / S550? : Not after the large bunch of other stuff I'm planning to make is all done.
Is that your mod in those screenshots? : Is it the Skyline R33, the Audi A5, the Crossfire, the Supra JZA80 (with Bigg Boss93) or one of the ones I've released (like the Mustangs)? If so, yes. If not, probably not; search the GOM and VStanced downloads sections for it.
Mustang mod updates? : A new SN95 1995 Mustang mod is planned (the original wasn't mine); a Foxbody remake with LOD0 meshes is in the works, and will include more parts than the original version; and I am preparing updates to the SN95 2000, many of which are finished but not there yet.
It's not underestimating. I'm saying that nobody with common sense would try to do that (even though it sounds simple and I have an idea how could it be done; no Java skills though)
#Jfernando1 :
Also, in other news, have you tried the Civic bumpers?
I've checked the EK9 updated by Razine & Joealex, it have all the bumpers from Forza 4 so idk why to export it again. (VS EK9 and my single piece EK9 comes from Forza 4, basically they are the same model with different uvw mapping).
About the digital speedo:
I think it is not that hard to script, but the way that i'm think it could be done require some patience
My idea is something like this:
public void updatevariables()
{
the_car = null;
getCar_LocalVersion();
if( the_car && GameLogic.player && GameLogic.player && GameLogic.player.car && the_car == GameLogic.player.car.chassis ) // player is using this car
{
float speed = player.car.getSpeedSquare();
switch (speed)
{
case 1: //1km/h
{
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0002r); //set render to 1km/h
Thread.sleep( 250 ); // wait 0.25 s
break;
}
case 2: //2km/h
{
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0003r); //set render to 2km/h
Thread.sleep( 250 ); // wait 0.25 s
break;
}
case 3: //3km/h
{
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0004r); //set render to 3km/h
Thread.sleep( 250 ); // wait 0.25 s
break;
}
.
.
.
case 319: //319km/h
{
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0320r); //set render to 319km/h
Thread.sleep( 250 ); // wait 0.25 s
break;
}
case 320: //320km/h
{
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0321r); //set render to 320km/h
Thread.sleep( 250 ); // wait 0.25 s
break;
}
default: //0km/h
setRenderType(cars.NIS_SkylineGTRVSpecII_02.speedo:0x0001r); //set render to 0km/h
Thread.sleep( 100 ); // wait 0.1 s
break;
}
}
}
Of course i know that it wouldn't work in exactly that way, i just have started to learn programming few months ago so i'm still a noob xD
Well that is a genius Idea but you will hav to do it 320 times.Lets say that the gauge takes values from
0-290 km/h.You have to do it 290 times.
Added 15 minutes later:
And something else.In the middle of the dash there is an display which says your gear.It is automatic transmission.Lets say that this is easy to make one automatic.But this how will work.
This post was edited by Alexkiller3 (2017-10-14 06:32, ago)
Here's the script I wrote for the multiple-scale analog speedometer for the Audi A5/S5/RS5:
public class SpeedometerBase extends DecorativeBodyPart
{
// begin movable speedometer script
Ypr anim_ori; // rotation vector, dynamically assigned
int speedo_check_overflow = 0;
int speedo_check_underflow = 1;
int speedo_num_regions = 1; // will be equal to last array's index; number of speedometer "chunks"
float[] speedo_value = new float[5];
float[] speedo_pos = new float[5];
Thread AnimateThread;
int installed;
public SpeedometerBase( int id )
{
super( id );
speedo_num_regions = 3;
speedo_value[0] = 0.0;
speedo_pos[0] = 0;
speedo_value[1] = 80.0;
speedo_pos[1] = 120;
speedo_value[2] = 240.0;
speedo_pos[2] = 240;
speedo_value[3] = 300.0;
speedo_pos[3] = 270;
AnimateThread = new Thread( this, "Animate Thread" );
//animate_last_time = System.simTime();
AnimateThread.start();
}
public void resetAnim() // forces animation to reset
{
if( partOnSlot(991) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,0,0) );
}
public void setGaugeNeedlePos( float deg )
{
if( partOnSlot(991) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,0,deg2rad(deg)) );
}
public float rad2deg( float rad )
{
return(rad * 180 / 3.1415926);
}
public float deg2rad( float deg )
{
return(deg * 3.1415926 / 180);
}
public float calcPointSlope( float x, float x1, float y1, float x2, float y2 )
{
return (y1 + (x-x1)*((y2-y1)/(x2-x1)));
}
public float position_interp( float speed )
{
float deg;
if( speedo_pos.length != speedo_value.length )
return 0;
int max = speedo_num_regions;
// Anti-Overrun Checks
if( speedo_check_overflow && speed > speedo_value[max] )
speed = speedo_value[max];
else if ( speedo_check_underflow && speed < speedo_value[0] )
speed = speedo_value[0];
int region = -1;
int test_looper = 0;
if( speed < speedo_value[0] )
region = 0;
while( region == -1 )
{
if( speed >= speedo_value[test_looper] && speed <= speedo_value[test_looper+1] )
region = test_looper;
if( test_looper == max-1 )
region = max-1;
test_looper++;
}
deg = calcPointSlope( speed, speedo_value[region], speedo_pos[region], speedo_value[region+1], speedo_pos[region+1] );
return deg;
}
public void run()
{
while(1)
{
if(AnimateThread)
{
the_car = null;
getCar_LocalVersion();
if( the_car && GameLogic.player && GameLogic.player.car && the_car == GameLogic.player.car.chassis ) // player is using this car
{
installed = 1;
float speed = Math.sqrt(GameLogic.player.car.getSpeedSquare())*3.6;
setGaugeNeedlePos(position_interp(speed));
//setSlotPos( 991, new Vector3(0,0,0), new Ypr(0,0,-3.142) );
if(AnimateThread) AnimateThread.sleep(5); // Wait 0.005 sec (in theory, assuming 29 FPS)
}
else
{
if( installed )
{
setSlotPos( 991, new Vector3(0,0,0), new Ypr(0,0,0) );
installed = 0;
}
if(AnimateThread) AnimateThread.sleep( 2000 ); // Wait 2 sec
}
}
}
}
}
Give me a bit and I'll have a digital version, because believe me, I will have a digital speedometer available in the R33.
(Also, the only reason I used "switch / case / break" instead of "if / then / else" in that snippet of code I sent you is because it was easier. For most cases, it will be significantly easier to do what you want with if / then / else.)
Roleplay set roughly in a fictionalized version of Phoenix, Arizona. The time varies, with a lot of flashbacks / stories told through old photos as well as flash forwards to later times, but is intended to be one continuous story. My character is about 5 years older than myself, and considerably richer. lol. I have a couple of other made-up characters for the RP too.
Current cars:
- Nissan Skyline GT-R V-Spec (BCNR33 1996 S2)
- Toyota Supra (JZA80 1993) - auto N/A; work in progress
Will the R33 ever be released? When? : The R33 is a long running work in progress that will be released when it's done, and not a moment sooner. I'm definitely being a perfectionist about this, but I want this to be the mod the community deserves and expects, not merely the latest in a set of stop-gap mods.
Will you be making a Mustang 2015 / S550? : Not after the large bunch of other stuff I'm planning to make is all done.
Is that your mod in those screenshots? : Is it the Skyline R33, the Audi A5, the Crossfire, the Supra JZA80 (with Bigg Boss93) or one of the ones I've released (like the Mustangs)? If so, yes. If not, probably not; search the GOM and VStanced downloads sections for it.
Mustang mod updates? : A new SN95 1995 Mustang mod is planned (the original wasn't mine); a Foxbody remake with LOD0 meshes is in the works, and will include more parts than the original version; and I am preparing updates to the SN95 2000, many of which are finished but not there yet.
As i said, i'm still a noob at programming xD
I thought in using "switch case" because my teacher said that it works faster than "if else" especially when you have a lot of entries/values/variations
I don't know if it really makes a huge difference
It doesn't cause any significant speed problems in-game on my machine, but it might on yours.
Also consider that making it check 320 cases is computationally expensive anyway. It should probably just set the hundreds, tens, and units digits separately (using a modulus operator or something like that).
I'll have a digital speedometer added to the R33 (as a custom part) in short order. It should show you how to make this work.
(Now I really wish SLRR actually sent out the engine RPM to the Java files. If so, I could help you make an accurate script for the "kouki" R34 gauges with the multi-scale tachometer, and maybe even a digital gauge cluster too. Not to mention swap-able tachometers.)
Roleplay set roughly in a fictionalized version of Phoenix, Arizona. The time varies, with a lot of flashbacks / stories told through old photos as well as flash forwards to later times, but is intended to be one continuous story. My character is about 5 years older than myself, and considerably richer. lol. I have a couple of other made-up characters for the RP too.
Current cars:
- Nissan Skyline GT-R V-Spec (BCNR33 1996 S2)
- Toyota Supra (JZA80 1993) - auto N/A; work in progress
Will the R33 ever be released? When? : The R33 is a long running work in progress that will be released when it's done, and not a moment sooner. I'm definitely being a perfectionist about this, but I want this to be the mod the community deserves and expects, not merely the latest in a set of stop-gap mods.
Will you be making a Mustang 2015 / S550? : Not after the large bunch of other stuff I'm planning to make is all done.
Is that your mod in those screenshots? : Is it the Skyline R33, the Audi A5, the Crossfire, the Supra JZA80 (with Bigg Boss93) or one of the ones I've released (like the Mustangs)? If so, yes. If not, probably not; search the GOM and VStanced downloads sections for it.
Mustang mod updates? : A new SN95 1995 Mustang mod is planned (the original wasn't mine); a Foxbody remake with LOD0 meshes is in the works, and will include more parts than the original version; and I am preparing updates to the SN95 2000, many of which are finished but not there yet.
Here's what I came up with for a digital speedometer. Note that this is completely un-tested and I could very well have made some errors. (I will, however, have it tested in short order.)
Also, this is for a "slot machine wheel" way of rendering the digits, where it rotates vertically. If you want to set it up another way, just change the code in setGaugeDigitPos. If you want to use different renders, look at the source code for my Crossfire wing (or for BB93's Community Rimpack) to see how to change the render of an object.
package java.game.cars;
import java.io.*;
import java.util.*;
import java.util.resource.*;
import java.render.osd.*;
import java.game.*;
import java.game.cars.*;
import java.game.parts.*;
import java.game.parts.bodypart.*;
import java.game.parts.enginepart.*;
import java.game.parts.rgearpart.*;
import java.game.parts.rgearpart.reciprocatingrgearpart.*;
public class SpeedometerDigital extends DecorativeBodyPart
{
// begin movable speedometer script
Ypr anim_ori_1; // rotation vector for first digit (units), dynamically assigned
Ypr anim_ori_2; // rotation vector for second digit (tens), dynamically assigned
Ypr anim_ori_3; // rotation vector for third digit (hundreds), dynamically assigned
// int speedo_check_overflow = 0;
// int speedo_check_underflow = 1;
// int speedo_num_regions = 1; // will be equal to last array's index; number of speedometer "chunks"
// float[] speedo_value = new float[5];
// float[] speedo_pos = new float[5];
int speedo_units = 0; // 0 = metric, 1 = Imperial / US customary
int speedo_hide_unused_digits = 1; // 1 = yes, 0 = no
Thread AnimateThread;
int installed;
static float math_pi = 3.1415926;
static float kmh_to_mph = 0.621371;
static float deg_to_rad = math_pi / 180;
public SpeedometerDigital( int id )
{
super( id );
speedo_units = 0;
speedo_hide_unused_digits = 1;
AnimateThread = new Thread( this, "Animate Thread" );
AnimateThread.start();
}
public void resetAnim() // forces animation to reset
{
if( partOnSlot(991) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,0,0) );
if( partOnSlot(992) )
partOnSlot(993).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,0,0) );
if( partOnSlot(993) )
partOnSlot(993).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,0,0) );
}
public void setGaugeDigitPos( int dig1, int dig2, int dig3 )
{
if( partOnSlot(991) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,deg2rad(dig1/10*360),0) );
else if( partOnSlot(991) ) // checks to see if first speedo digit is installed
partOnSlot(991).setSlotPos( 1, new Vector3(0,-0.100,0), new Ypr(0,0,0) );
if( partOnSlot(992) && (dig2 || !speedo_hide_unused_digits) ) // checks to see not only if second digit part is installed, but also if either dig2 >= 0 or hide_unused_digits is false
partOnSlot(992).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,deg2rad(dig2/10*360),0) );
else if( partOnSlot(992) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,-0.100,0), new Ypr(0,0,0) );
if( partOnSlot(993) && (dig3 || !speedo_hide_unused_digits) ) // checks to see not only if second digit part is installed, but also if either dig3 >= 0 or hide_unused_digits is false
partOnSlot(993).setSlotPos( 1, new Vector3(0,0,0), new Ypr(0,deg2rad(dig2/10*360),0) );
else if( partOnSlot(993) )
partOnSlot(991).setSlotPos( 1, new Vector3(0,-0.100,0), new Ypr(0,0,0) );
}
public float rad2deg( float rad )
{
return(rad / deg_to_rad);
}
public float deg2rad( float deg )
{
return(deg * deg_to_rad);
}
public float kmh2mph( float kmh )
{
return(kmh * kmh_to_mph);
}
public float mph2kmh( float mph )
{
return(mph / kmh_to_mph);
}
public int speedo_calc_digit1 ( float speed, int )
{
int result;
float speedtemp;
if( speedo_units )
speedtemp = kmh2mph(speedtemp);
while (speedtemp >= 100)
speedtemp += (-100);
while (speedtemp >= 10)
speedtemp += (-10);
result = speedtemp;
return result;
}
public int speedo_calc_digit2 ( float speed, int )
{
int result;
float speedtemp;
if( speedo_units )
speedtemp = kmh2mph(speedtemp);
while (speedtemp >= 100)
speedtemp += (-100);
speedtemp = speedtemp / 10;
result = speedtemp;
return result;
}
public int speedo_calc_digit3 ( float speed, int )
{
int result;
float speedtemp;
if( speedo_units )
speedtemp = kmh2mph(speedtemp);
speedtemp = speedtemp / 100;
result = speedtemp;
return result;
}
public void run()
{
while(1)
{
if(AnimateThread)
{
the_car = null;
getCar_LocalVersion();
if( the_car && GameLogic.player && GameLogic.player.car && the_car == GameLogic.player.car.chassis ) // player is using this car
{
installed = 1;
float speed = Math.sqrt(GameLogic.player.car.getSpeedSquare())*3.6;
setGaugeDigitPos(speedo_calc_digit1(speed),speedo_calc_digit2(speed),speedo_calc_digit3(speed));
//setSlotPos( 991, new Vector3(0,0,0), new Ypr(0,0,-3.142) );
if(AnimateThread) AnimateThread.sleep(5); // Wait 0.005 sec (in theory, assuming 29 FPS)
}
else
{
if( installed )
{
setSlotPos( 991, new Vector3(0,0,0), new Ypr(0,0,0) );
setSlotPos( 992, new Vector3(0,0,0), new Ypr(0,0,0) );
setSlotPos( 993, new Vector3(0,0,0), new Ypr(0,0,0) );
installed = 0;
}
if(AnimateThread) AnimateThread.sleep( 2000 ); // Wait 2 sec
}
}
}
}
}
Roleplay set roughly in a fictionalized version of Phoenix, Arizona. The time varies, with a lot of flashbacks / stories told through old photos as well as flash forwards to later times, but is intended to be one continuous story. My character is about 5 years older than myself, and considerably richer. lol. I have a couple of other made-up characters for the RP too.
Current cars:
- Nissan Skyline GT-R V-Spec (BCNR33 1996 S2)
- Toyota Supra (JZA80 1993) - auto N/A; work in progress
Will the R33 ever be released? When? : The R33 is a long running work in progress that will be released when it's done, and not a moment sooner. I'm definitely being a perfectionist about this, but I want this to be the mod the community deserves and expects, not merely the latest in a set of stop-gap mods.
Will you be making a Mustang 2015 / S550? : Not after the large bunch of other stuff I'm planning to make is all done.
Is that your mod in those screenshots? : Is it the Skyline R33, the Audi A5, the Crossfire, the Supra JZA80 (with Bigg Boss93) or one of the ones I've released (like the Mustangs)? If so, yes. If not, probably not; search the GOM and VStanced downloads sections for it.
Mustang mod updates? : A new SN95 1995 Mustang mod is planned (the original wasn't mine); a Foxbody remake with LOD0 meshes is in the works, and will include more parts than the original version; and I am preparing updates to the SN95 2000, many of which are finished but not there yet.