Home | Yellow caution flags. |
|
Introduction
Racer added a rudimentary system for controller race caution flags in v0.9.0RC9. It is not automated, so there mostly for the future.
Console commands
A few commands have been added to control race flags manually: mpost and mposts. See the console command reference page for the exact syntax. These can be used in Racer to turn on/off all flags, or control the color per flag independently.
The following states are defined for each post (i.e. 'mpost 1 4' will set the state of the 2nd marshal post to 'black'):
These states will evoke certain behavior in the marshal posts, which depends on the types of so-called 'actors' defined for each post.
Actors
Post states can currently be expressed in 3 forms; flashing lights, waving flags and signs. The expression forms are called 'actors', and are defined in the track's special.ini file.
Here is an example extract from special.ini which defines 2 posts:
... marshal_posts
{
count=2
post0
{
spline_from=0
spline_to=10 user_id=0
actors=2
actor0
{
type=0
state_blue=mpost_light_blue_14_mpost_000_light_blue
state_green=mpost_light_green_12_mpost_000_light_green
state_red=mpost_light_red_13_mpost_000_light_red
state_yellow=mpost_light_yellow_11_mpost_000_light_yellow
}
actor1
{
type=1
state_blackwhite=mpost_flag_blackwhite_6_mpost_000_flag_blackwhite
state_black=mpost_flag_black_4_mpost_000_flag_black
state_blue=mpost_flag_blue_3_mpost_000_flag_blue
state_finish=mpost_flag_finish_9_mpost_000_flag_finish
state_green=mpost_flag_green_2_mpost_000_flag_green
state_meatball=mpost_flag_meatball_7_mpost_000_flag_meatball
state_oil=mpost_flag_oil_8_mpost_000_flag_oil
state_red=mpost_flag_red_1_mpost_000_flag_red
state_white=mpost_flag_white_5_mpost_000_flag_white
state_safetycar=mpost_flag_yellow_0_mpost_000_flag_sc
state_yellow=mpost_flag_yellow_0_mpost_000_flag_yellow
state_yellowdouble=mpost_flag_yellow_0_mpost_000_flag_yellowdouble
state_safetycar=mpost_sign_sc_10_mpost_000_flag_sc
}
}
post1
{
spline_from=10
spline_to=20
user_id=1
actors=1
actor0
{
type=1
state_blackwhite=mpost_flag_blackwhite_6_mpost_001_flag_blackwhite
state_black=mpost_flag_black_4_mpost_001_flag_black
state_blue=mpost_flag_blue_3_mpost_001_flag_blue
state_finish=mpost_flag_finish_9_mpost_001_flag_finish
state_green=mpost_flag_green_2_mpost_001_flag_green
state_meatball=mpost_flag_meatball_7_mpost_001_flag_meatball
state_oil=mpost_flag_oil_8_mpost_001_flag_oil
state_red=mpost_flag_red_1_mpost_001_flag_red
state_white=mpost_flag_white_5_mpost_001_flag_white
state_safetycar=mpost_flag_yellow_0_mpost_001_flag_sc
state_yellow=mpost_flag_yellow_0_mpost_001_flag_yellow
state_yellowdouble=mpost_flag_yellow_0_mpost_001_flag_yellowdouble
state_safetycar=mpost_sign_sc_10_mpost_001_flag_sc
}
}
}
This looks complex and therefore there is a system behind it. First let's explore the ini fields:
The state 3D object names are long, which is a result from instancing in 3D Studio Max. They are composed like this:
For example, the model name 'mpost_flag_blackwhite_6_mpost_001_flag_blackwhite' above means that it is part of post #1 (001), is of type flag (it probably depicts a flag) and displays state 'blackwhite' (probably a black & white flag material is mapped onto the model). The prefix 'mpost_flag_blackwhite_6' is just a material name (which includes in this case a submaterial ID).
About user_id vs indices
As you can see in the given example, each post has a user_id field. This indicates the number that is used to control the post. For example, you could set marshal_posts.post1.user_id to 123, in which case you'd have to use the console command 'mpost 123 1' to set it's state to 1 (yellow). This might be confusing at first, if you're inclined to use 'mpost 1 1'. With user ID's however, you can use the real track's numbering scheme independently of how the posts were modeled.
Templates for special.ini
The above example shows that the ini settings are relatively complex and that it is easy to make mistakes. Also, since Max makes instancing possible, it would be easier to let Racer search for the objects and decide on which goes where. Fortunately, TrackEd contains such a function. In the Marshal Posts section (F10) there is a 'Make template for special.ini' button which does just that.
Given the object name template as described above, just insert the 3D models in your scene and import them in TrackEd. Save & reload the track, then click the 'Make template' button. This searches for 3D names with '_mpost_' somewhere and then derives the context from the name template (<material>_mpost_<n>_<type>_<state>) to be able to create the special.ini entries.
The above extract was generated using this template generator, since making mistakes doing it manually was far too easy. The 3D models were done in 3D Studio Max.
Limitations
The following limitations currently apply (Jan 2nd 2014):
(last updated February 20, 2014 )