ehem. OMSI - Forum

Dieses Forum wurde geschlossen. Das neue Forum befindet sich auf www.omnibussimulator.de/forum !
 
StartseiteStartseite  FAQFAQ  SuchenSuchen  MitgliederMitglieder  NutzergruppenNutzergruppen  AnmeldenAnmelden  LoginLogin  

Teilen | 
 

 Turbocharger scripting help,

Nach unten 
AutorNachricht
krtz07



Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 32
Ort : Philadelphia PA

BeitragThema: Turbocharger scripting help,    So 3 Apr - 5:15

I've been trying to script out a turbocharger, not too sure if I am even remotely on the right track, but I started out to reuse the f.l.engine.throttle function in the engine.osc which OMSI apparently has and duplicated the code, but change the values, set yp those values in the consist file and whatnot, and made changes to the varlist.txt... in omsi, the bus acts extremely funny.

Code:
   (L.L.engine_injection_on) (L.L.engine_on) &&
   {if}
      (L.L.engine_throttle_injection) s1 (L.L.engine_n) s0 (F.L.engine_M_maxThrottle) * 1 l1 - l0 (F.L.engine_M_minThrottle) * + (S.L.engine_M)

      (L.L.engine_throttle_injection) s1 (L.L.turbocharger_n) s0 (F.L.turbocharger_M_maxThrottle) * 1 l1 - l0 (F.L.turbocharger_M_maxThrottle) * + (S.L.turbocharger_M)

then I took the {macro:engine_acceleration} values and created duplicates values... I managed to set everything up so it would not have any type of crash or anything when selecting the experiential vehicle, but apparently no luck with getting OMSI to understand what i want it to do.

Code:
{macro:engine_acceleration}
'   Berechnung der Drehzahlbeschleunigung:

'    Calculation of speed acceleration:

   (L.L.turbocharger_M) (L.L.antrieb_getr_M_an) + (C.L.engine_J) /

'   ... Berechnung der Motordrehzahl anhand der Drehzahlbeschleunigung:

   (L.S.Timegap) * 40 * pi / (L.L.turbocharger_n) + (S.L.turbocharger_n)


'    Calculation of speed acceleration:

   (L.L.engine_M) (L.L.antrieb_getr_M_an) (L.L.engine_M_additional_load) + - (C.L.engine_J) /

'   ... Berechnung der Motordrehzahl anhand der Drehzahlbeschleunigung:

   (L.S.Timegap) * 30 * pi / (L.L.engine_n) + (S.L.engine_n)

   (L.L.engine_n) (L.L.turbocharger_n) + (S.L.engine_n)


It would be nice to know if i am headed in the right direction or should i abandon ship? I would greatly appreciate any help or something.. Is there some kind of function just for a turbocharger that could be used?
Nach oben Nach unten
Benutzerprofil anzeigen http://www.philadelphiatransitvehicles.info
krtz07



Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 32
Ort : Philadelphia PA

BeitragThema: Re: Turbocharger scripting help,    Di 5 Jul - 13:54

Tried it again using a different approach and now it is working with the turbocharger sound, lag, inertia and all.
Nach oben Nach unten
Benutzerprofil anzeigen http://www.philadelphiatransitvehicles.info
Thiago

avatar

Anzahl der Beiträge : 252
Anmeldedatum : 18.02.11
Ort : Brazil

BeitragThema: Re: Turbocharger scripting help,    Mi 6 Jul - 6:57

Great. Will it feature some of your existing engine/transmissions?
Nach oben Nach unten
Benutzerprofil anzeigen http://www.tooo.com.br/omsi
krtz07



Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 32
Ort : Philadelphia PA

BeitragThema: Re: Turbocharger scripting help,    Do 7 Jul - 1:10

Yea as always the script will be open to those who wishes to use it. It makes no sense to do a script and limit it to my self to use it. Very Happy No transmission scripting involved, thankfully. My first post in this thread which i have made back in April was so wrong! It is amazing how much I have learned about the coding since then. Very Happy

I will admit up ahead that I do not know everything about how turbochargers work. I just got down to the basic function and use several factors such as engine rpm, turbocharger inertia, horsepower contribution, and a few other options, curves to make it work.
Nach oben Nach unten
Benutzerprofil anzeigen http://www.philadelphiatransitvehicles.info
Thiago

avatar

Anzahl der Beiträge : 252
Anmeldedatum : 18.02.11
Ort : Brazil

BeitragThema: Re: Turbocharger scripting help,    Sa 9 Jul - 11:14

That's very interesting! I never saw a turbocharger in action. I think they don't exist in buses here.
Nach oben Nach unten
Benutzerprofil anzeigen http://www.tooo.com.br/omsi
ediblechickenwing



Anzahl der Beiträge : 317
Anmeldedatum : 16.04.10
Ort : South Wales, UK

BeitragThema: Re: Turbocharger scripting help,    Sa 9 Jul - 13:07

Thiago schrieb:
That's very interesting! I never saw a turbocharger in action. I think they don't exist in buses here.

Yes they will, any modern bus will have them Wink
Nach oben Nach unten
Benutzerprofil anzeigen
krtz07



Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 32
Ort : Philadelphia PA

BeitragThema: Re: Turbocharger scripting help,    So 17 Jul - 0:53

Nach oben Nach unten
Benutzerprofil anzeigen http://www.philadelphiatransitvehicles.info
Gesponserte Inhalte




BeitragThema: Re: Turbocharger scripting help,    

Nach oben Nach unten
 
Turbocharger scripting help,
Nach oben 
Seite 1 von 1

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
ehem. OMSI - Forum :: OMSI-Design (english) :: Script programming-
Gehe zu: