Project type: Bus / script modification
Project name: Improved interior lighting for the Citaro (CIIL)
People involved:
- Author: Unorthodox Paradox
-
Accredited:
- Morphi et al.: Authors of the base modification.
- alTerr et al.: Authors of the base vehicle.
- MR Software: Authors of the game and reused base content (the lighting script in its initial, unaltered state, specifically).
Copyright / licensing: Original content is copyleft. Redistributed content is subject to the terms of its respective authors.
Pictures / videos: N/A
This modification allows automatic reduction of the Citaro's passenger cabin's lighting under certain low-brightness conditions, so as to reduce the eyestrain imposed on the driver. It is essentially a more flexible variant of the modification originally proposed in this discussion thread.
Installation
- Download the modification's files from here.
- Extract the downloaded archive (omsi_2_ciil-1.0.0.zip) into your OMSI 2 installation directory, approving merging if prompted (no original files are going to be modified). As usual, for your own convenience, backing up (or duplicating and modifying their copies instead) the files that you will be instructed to modify, prior to editing them, is encouraged. For each vehicle that you intend to apply the modification to, carry out the remaining steps.
- Open the model_xxx.cfg of the "main" (i.e., not that of the trailer, in case of an articulated variant) of the vehicle you are applying the modification to, using your text editor of choice. Perform the modifications listed below:
-
-
- For 2-door variants only:
- For 3-door solo variants only:
- For articulated variants only:Code
- [mesh]
- O530_G\iil\Decke2.001.o3d
- [matl_change]
- 02.jpg
- 0
- lights_beleuchtung_untenrechts_mode
- [matl_item]
- [matl_nightmap]
- 02_n1.jpg
- [matl_item]
- [matl_nightmap]
- 02_n.jpg
- [illumination_interior]
- 0
- 1
- 2
- 3
- [mesh]
- O530_G\iil\Decke2.002.o3d
- [matl_change]
- 02.jpg
- 0
- lights_beleuchtung_untenrechts_mode
- [matl_item]
- [matl_nightmap]
- 02_n1.jpg
- [matl_item]
- [matl_nightmap]
- 02_n.jpg
- [illumination_interior]
- 0
- 1
- 2
- 3
- [mesh]
- O530_G\iil\Decke2.003.o3d
- [matl_change]
- 02.jpg
- 0
- lights_beleuchtung_unterdeck
- [matl_item]
- [matl_nightmap]
- 02_n.jpg
- [illumination_interior]
- 0
- 1
- 2
- 3
- [mesh]
- O530_G\iil\Decke2.o3d
- [matl_change]
- 02.jpg
- 0
- lights_beleuchtung_unterdeck
- [matl_item]
- [matl_nightmap]
- 02_n.jpg
- [illumination_interior]
- 0
- 1
- 2
- 3
- (Optional) To correct an independent little bug of money not being illuminated properly (at all, basically), cut (delete) the following entry and paste it at the end of the file (note that in articulated variants the object file resides under the O530_G directory instead):Code
- [mesh]
- O530\Zahltisch_Wechsler_15_00.o3d
- [illumination_interior]
- 0
- 1
- 2
- 3
- [viewpoint]
- 2
- [mouseevent]
- cashdesk_changer_15_00
- [newanim]
- origin_from_mesh
- anim_rot
- cashdesk_changer_sw_15_00
- 35
- maxspeed
- 700
- [newanim]
- origin_trans
- 0.12
- 5.22
- 0
- origin_rot_x
- 0
- origin_rot_y
- -90
- origin_rot_z
- 0
- anim_rot
- cp_fahrertuer_pos
- 85
Save and close the model configuration file.
-
- Open the xxx_main.bus file of the vehicle you are applying the modification to, using your text editor of choice, and perform the following actions:
- If you are modifying a copy, you may wish to provide a disambiguating name under the [friendlyname] entry.
- If you duplicated the model_xxx.cfg file previously, change the path of the [model] entry, such that it refers to the copy.
- Under the [varnamelist] enumeration, replace script\lights_varlist.txt with script\lights_vars_iil.txt.
- Under the [script] enumeration, replace script\lights.osc with script\lights_iil.osc.
- Under the [constfile] enumeration, replace script\lights_constfile.txt with script\lights_consts_iil.txt.
- If you intend to modify a copy of the xxx_trail.bus file in step (5) change the path of the [couple_back] entry, such that it refers to the copy.
Save and close the bus file.
- If you are modifying an articulated variant, repeat step (4.3) for the corresponding xxx_trail.bus file.
The following constants collectively reside in script\lights_consts_iil.txt. Only specific values / value ranges can be assigned to them, as documented below; failing to do so will cause the script to use the respectively indicated constant-specific default value.
-
lights__passenger_cabin__dimming__op_mode
Purpose: Specifies the kind of passenger cabin lighting reduction operation to be performed.
Acceptable values:- 0: Dim the two front-most lights
- 1: Switch the two front-most lights off
- 2: Switch "half" the lights off, as if the dashboard switch were set to level 1.
Default value: 0
-
lights__passenger_cabin__dimming__door_dependence
Purpose: Specifies which doors will cause passenger cabin lighting to be reset, when opened.
Acceptable values:- 0: Only the front door
- 1: Any door
Default value: 1
-
lights__passenger_cabin__dimming__min_velocity
Purpose: Specifies whether passenger cabin lighting reduction will be delayed post door closure, until the vehicle has reached a certain velocity.
Acceptable values:- > 0 (km/h): Reduction is to occur after the vehicle has exceeded the velocity specified.
- -1: Reduction is to occur independently of velocity.
Default value: 7
-
lights__passenger_cabin__dimming__delay
Purpose: Specifies whether passenger cabin lighting reduction will be delayed post door closure, until a certain temporal duration has elapsed.
Acceptable values: ≥ 0 (sec): Reduction is to occur after the specified delay has elapsed (assuming doors have been closed, and (3), if applicable, is satisfied).
Default value: 5 -
lights__passenger_cabin__dimming__ext_lights_dependence
Purpose: Specifies whether passenger cabin lighting reduction shall depend on the state of the vehicle’s exterior lighting, the level of environmental brightness, or both factors.
Acceptable values:- 0: Reduce passenger cabin lighting when the exterior lighting is active, as per (6).
- 1: Reduce passenger cabin lighting when the environment is sufficiently dark, as per (7), (8), (9).
- 2: Reduce passenger cabin lighting when either the exterior lighting is active, or the environment is sufficiently dark.
- 3: Reduce passenger cabin lighting when both the exterior lighting is active, and the environment is sufficiently dark.
Default value: 0
Remarks: Values 1-3 are experimental and may not produce perfectly realistic results under certain daytime conditions, because the implementation depends on OMSI’s built-in Envir_Brightness variable, which in turn is (unfortunately) calculated taking light emitted by street lights, as opposed to merely insolation, into account. -
lights__passenger_cabin__dimming__min_ext_lighting_level
Purpose: Specifies when passenger cabin lighting reduction shall be performed, based on the state of the vehicle’s exterior lighting. The setting is ignored when (5) is set to 1.
Acceptable values:- 0: Reduce passenger cabin lighting when at least standstill lights are on.
- 1: Reduce passenger cabin lighting when at least headlights are on. Use this setting if you tend to drive with standstill lights on most of the time, regardless the weather.
Default value: 0
-
lights__passenger_cabin__dimming__min_env_brightness
Purpose: Specifies when passenger cabin lighting reduction shall be performed, based on the level of environmental brightness. The setting is ignored when (5) is set to 0.
Acceptable values: Passenger cabin lighting will be reduced if the environment is darker than the value. The allowed range is [0.65, 1]. The higher the value, the more "darkness-sensitive" the light sensor will be.
Default value: 0.7 -
lights__passenger_cabin__dimming__light_sensor_brightness_tolerance
Purpose: Specifies, combined with (7), the delay beyond which passenger cabin lighting will be reset. The setting is ignored when (5) is set to 0.
Acceptable values: ≥ 1 (sec): Passenger cabin lighting will be reset when the environment has been brighter than (7) for a duration at least as long as this constant’s value. The lower the value, the more "brightness-sensitive" the light sensor will be.
Default value: 120 -
lights__passenger_cabin__dimming__light_sensor_darkness_tolerance
Purpose: Specifies, combined with (7), the delay beyond which passenger cabin lighting will be reduced. The setting is ignored when (5) is set to 0.
Acceptable values: 0 ≤ c ≤ ( (8) - 1 ) (sec): Passenger cabin lighting will be reduced when the environment has been darker than (7) for a duration at least as long as this constant’s value. The lower the value, the more "darkness-sensitive" the light sensor will be.
Default value: min( 30, ( (8) - 1 ) )
Question 1: Will this mod work with <insert-arbitrary-quadruply-modded-Citaro-variant-here>?
Answer: I have no idea. Whatever the case, I will not provide support unless a version amongst those explicitly declared as supported is being used.
Q2: Will the FL or some other variant ultimately be supported?
A: Yes, potentially. I would like to, at some indefinite point in the future, "port" this both to Morphi's modded FL (which however would require Helvete to grant me access to the light object, since my Blender skills are subzero), as well as Morphi's latest Citaro I iteration (if it ever gets finalized).
Q3: May I report a bug?
A: You can obviously post whatever you like -- it is not me who controls these boards. And as long as it indeed is a bug report, as opposed to a question arising because of unwillingness to read the documentation, it will also be welcome. But do please also note that I am by no means obligated to provide any kind of support.
Q4: I have configured the script so that lighting is supposed to be reduced without any delay, both time- and velocity-wise. But sometimes, upon first starting up the engine, reduction is still delayed. Why is that?
A: It's due to insufficient air pressure initially, which means that doors are in an "erroneous" state, i.e., they are not considered to be "properly" closed, hence the state of the lighting. Upon pressure normalization the lighting will behave as specified.
Q5: I badly want the first light on the left to blink every third second in varying colors whenever the fourth door gets opened, and Manfred to sing "Jingle Bells" in parallel. Plzzz h3lp!11
A: Merry Christmas.