Notice: This LLCR distribution is just for testing purposes, you should not rely on provided KUIDS. You are not allowed to redistribute this rule and all stock related to and included in it. Please download and install both CDPs, save and unpack the RAR file for your reference. |
  LLCR 1.2b.cdp For TRS2004 SP1. | |
  LLCR 1.3b.cdp For TRS2004 SP2 and up. | |
  demo pack 1.1.cdp | |
  demo sources 1.1.rar | |
Click here to see the list of changes. |
|
Introduction: This rule, when added to a session, monitors every LLCR-compatible locomotive in it. If the locomotive couples with LLCR-compatible cars/coaches, the rule will control their lights. Why using a rule instead of a scriptlet? A scriptlet is a piece of code permanently embedded into a specific asset and it usually contains very customized code. There are scriptlets interacting with standard functionality of TRS while others require preparing assets some way; for example, coronas for marker lights. As soon as the user places the asset into a layout the script will be started, any single instance (copy) of an asset will have its own instance of the scriptlet running. Rules are somewhat different; a rule is a piece of code too but it isn't tied up to an asset, the user places the rule into the session and the code will control every asset in it. Like the scriptlet, depending on the way it is programmed, the rule may interact with standard functions or customized ones. The scriptlet approach is very interesting; it gives the maximum flexibility and power to the creator, as long as he knows how to program. There are a couple of drawbacks: A programmer may decide to share his/her code with other creators that (assuming they can't do scripting) would be constricted to the first or other programmer/s for updates or new functionalities... Then, given the fact that scriptlets are embedded into the asset, any minor update or correction will require to redistribute the whole asset for letting the older and newer users have the latest version... many Mbytes of stuff travelling up and down for, maybe, just a single line of code having been changed. Not to mention the waste of resources needed for executing the same copy of code for every asset present in the layout. This does not happen with the rule approach; the user will be still tied up to a programmer for updates and add-ons, but the centralized approach will minimize some of the problems mentioned above; and the assets behaviour will be coherent enough because the code is the same for every asset. |
|
Features:
|
|
Limitations:
|
|
Known bugs:
|
|
Loco Lighting Control Rule
Reference Table (beta 1) |
|
1) You don't have to include all the coronas in your model. just the ones needed for your light scheme. |
|
2) Coronas 6,7,14,15 are reserved for special configurations. At present they works as tail lights only by night |
|
3) Coaches will use 4,5,12,13 as tail lights. At present they turn on by day and if is raining (depending on which condition the user set). Wagons make use of attached meshes. |
|
4) Coronas 2,3,10,11 aren't marker lights but headlights. They are used them to simulate light at day and for dimming at night. They must overlap a.lights points in the loco, not to be used in coaches. |
|
Locomotive mesh-table: Content creators must configure the mesh table of their locomotives as follows:
Insert the desired numbers of coronas in the effects section of the mesh
table, optionally give a default texture-kuid for each corona and change its size to
suit your needs.The rule will load coronas dynamically from your locomotive kuid-table, the texture-kuid in the effects section is needed for the static effect visible in Railyard and Surveyor. Placing correct texture-kuids at this stage will improve the static appearance of your model. For further improvement you can use a null corona (available on DLS) to hide these points that you don't want to be seen by default. If you don't insert a texture-kuid the corona will default to yellow. |
|
Kuid-table & String-table: Next step is inserting the following entries in the kuid-table. The rule will search the coronas to be used here; corona_null is unused at run time. As said before the rule will load coronas dynamically from here. You are allowed to change the KUID but not the identifier, as the name suggests these kuids are related to points on the provided reference table. You should also add the icon for visual information of vehicle compatibility with this rule.
Then add these entries to the locomotive string-table. It is important to insert the same
version numbers of the rule you are using. A superior higher number will not work with
an lower rule version. Lower number will be useful to track potential bugs introduced between
revisions.The LLCR_TYPE parameter may contain these values: "LOCO" Valid for electric, diesel and steam locotenders. "LOCO+TENDER" Steamers with separate tender. "COACH" Although coaches don't use every corona you must fill in the kuid-table the same way as you do with locomotives, current code handling requires so.
Finally the LLCR icon. This icon informs the user that your vehicle is compatible with
LLCR rule. Its KUID was inserted in the kuid-table on previous step. To activate this, include this tag into the config:
We decided to put the icon last so as not to interfere with other icons that may exist
before. This minilogo for example, as showed on this picture:So, the config is over now. In the mesh you must add several anchor points named a.coronaN where the N matches the corresponding number in the reference table and in your config.txt effects section. Examine the provided Gmax sources for inspecting various examples. |
|
Wagons & Tenders: Car and tender configuration is slightly different, you don't have coronas here but lanterns, FREDs or whatever end device you choose. First of all you must create a couple of devices (car front/back) that will be configured as kind:mesh. Model the device around a fixed point in the car mesh then save to another file recentering the fixed point at 0,0,0. The config mesh-table will be like this:
You are required to mantain the naming convention for coronas and attachment
points (corona0 and corona1) but free to choose the texture, size and
frequency for flashing lights.The following mesh-table is for the car body, in this example we used a.limfront/a.limback as an attachment point but you are free to add your own points if you prefer. Our best suggestion is to inspect the provided Gmax sources. Again, you're required to keep the naming convention unchanged (tail_device_front/tail_device_back).
The car kuid-table is slightly different fromt previous samples because we don't
have any corona here:
Same as locomotives for version numbers but LLCR_TYPE must be "TENDER" or "WAGON":
And the LLCR icon to finalize.
|
|
Future of the rule: The code in usage is suffering from some limitations due to the interaction between marker, tail, headlights, train end devices and coaches tail lights depending on weather conditions and day/night time, the number of variables make makes implementing a dynamic setup complex, but not impossible though. However, while adding the various customizable parameters you may find on the control panel we built in that it takes a long effort to make it completely customizable. Added flexibility for creators and final users turns the code more complex, heavy and less readable by other programmers. We all know that many aspects of railroads are ruled by standards, this means that at a given era and/or location the lighting behaviour is coherent between vehicles. From a prototypycal standpoint the rule is greatly powerful, it avoids variations in the implementation of lighting, resulting in a homogeneous layout with vehicles acting in a coherent way. But this coherency isn't just a matter of number of lights and position, somewhere lights are on at day somewhere not, a train waiting for leaving may switch completely off lights or let markers light on and headlights off, or have both on... and so on. Programming a script that is good for all the standards we may found in the world is too much complex. We think that the best solution is: first create a DCC rule valid for any accidental users/creators and set it up as common standard. Then release the code as GPL open source to let everybody modify until matching the characteristics of the standard they are interested in. This means that after the release of LLCR DCC, the LLCR RENFE may follow, or SNCF, or whatever one choose. At this point the content creator will follow the setup guidelines provided with the custom version he needs, and the final user must choose the right rule for his layout/route if he wants to be prototypycal or, he will go for the 'basic' version without loosing too much (assuming that customized LLCRs must maintain backward compatibility with the DCC one). |
|
Updates: 18-april-2004 LLCR version 1.2b uploaded. New features:
Limitations about tail lights removed/changed from the list. Added a new chapter about the future of the rule. Generic revision of this document 17-may-2004 LLCR version 1.3b uploaded. Update:
|
|