This is an old revision of the document!


about developer kit

Thank you for purchase M28.

M28 does not drive by itself. However we have bundled a developer kit so that everyone who purchased can make themselves additional functions, and sell, distribute and introduce easily.

Do you want to light the headlight? Do you want to play the engine sound? You can do them yourself with the developer kit. Don't you want to drive M28? With the developer kit, you can make that wish much easier than developing everything.

All the purchaser of M28 have the right to sell or distribute their work which includes the kit. It's transferable!

configuration of the kit

developer kit for M28 … object / Mod-Copy-Trans
 ├ m28drivervasepose.bvh … pose for driver / Copy-Trans
 ├ m28passengerbasepose.bvh … pose for passenger / Copy-Trans
 └ vias10_for_m28.lsl … script for developing / Copy-Trans

vias10_for_m28.lsl is not actively processing. It is designed to perform specific processing by receiving link messages. Hereinafter, we express vias10_for_m28.lsl as VIAS1).

try our development sample out

You find AnalogMatic for M28 in the package of M28. This is our development in order to show you how VIAS works. After you install it, you can take your friend out with M28. We added 2 scripts and associate them with VIAS.

AnalogMatic for M28 … object
 ├ am-eg_for_m28.lsl … physical parameters
 ├ am-io_for_m28.lsl … interface and communications with VIAS
 ├ m28drivervasepose.bvh … pose for driver
 ├ m28passengerbasepose.bvh … pose for passenger
 └ vias10_for_m28.lsl … VIAS

See this page and install it.

development information

Make link both developer kit and M28 by the same procedure as AnalogMatic. After that, add scripts, animation, sound, etc and send link message from the script according to the following API to control M28.

about VIAS

VIAS is the basic script that controls the car state. From now on, all our vehicles will be equipped with VIAS and will be able to control the cars with the same API system.

VIAS can

  • control linkage motion of joints
  • switch the lights ON / OFF
  • run installing process » see this video
  • play / stop engine sound

By separating interfaces and physical engines and standardizing the specifications of car control scripts, the following advantages are generated for third-party developers.

  • can divert engine script once developed
  • can develop scripts without considering difficult parts such as linkage
  • also creators who are not modeler can partly participate in development

Further, as the number of developers who adopt this mechanism increases, the following advantages are created for users.

  • with one ride, they can try different operating methods and different ride comfort
  • only necessary functions can be selected and used according to time or place

about VIAS API

All transmission / reception is done with link message.

integer ApiVersion;
 
SendAPICommand(string command, integer value){ // transmission
    llMessageLinked(LINK_ROOT, value, command, "");
}
 
default{
    state_entry(){
        SendAPICommand("VERSION", 0);
    }
 
    link_message(integer sender, integer value, string response, key id){ // reception
        if (response == "VIAS-M28"){
            ApiVersion = value;
        }
        else if (llGetSubString(response, 0, 3) == "VIAS"){
            llSay(0, "[ERROR] does not correspond to this model");
        }
    }
}
API ver. command value 説明
1.0 VERSION Query API version. In response to the inquiry, the following reply will be made.
 response = “VIAS-M28” … To LINK_THIS, assign a value obtained by multiplying value by 10 times and return it. In the case of ver.1.0, value = 10 is returned.
1.0 RESET 0 Discard variables related to vehicle body control held by VIAS and restore the following initial state.
 LEFT = 0
 SPEED = 0
 GEAR = 0
 PARKING = 1
1 Reboot VIAS. With this command, VIAS starts the installation work; moves and rotates each link prim to the prescribed position. After reboot, the following reply will be made.
 response = “SEAT” … LINK_SET に対し、value にシート2)のリンク番号を代入して返します。同乗者の着座位置を llLinkSitTarget() で指定するときなどに使えると思います。
 response = “INIT” … LINK_SET に対し、value に、正常にインストールが完了したかどうかのブーリアンを代入して返します。
1.0 ENGINE 0 組み込みエンジン音を止めます。
1 組み込みエンジン音を鳴らします。
1.0 TEXT 0 フローティングテキストを非表示にします。
1 フローティングテキストを表示します。
1.0 LEFT -200 〜 200 ハンドルを左に回転し、その回転角度にあわせて前輪を動かします。 例えば、ハンドルを右に 12.7度回転させたい場合は value = -127 となります。
1.0 SPEED -100 〜 100 フローティングテキスト内のスピード値を変化させます。また、数値にあわせてタイヤの回転3)スピードが変化します。スピード値がマイナスの間は、GEAR は R と表示されます。VIAS 自体は物理エンジンを搭載していないため、実際に動かすためには別途物理エンジンが必要です。
1.0 GEAR 0 〜 4 フローティングテキスト内のギアの値を変化させます。また、シフトレバーを所定の位置に動かします。
1.0 PARKING 0 フローティングテキスト内のパーキングブレーキをオフにします。
1 フローティングテキスト内のパーキングブレーキをオンにします。
1.0 LIGHT 0 ヘッドライト = 消灯 / サイドライト = 消灯
1 ヘッドライト = 点灯 / サイドライト = 消灯
2 ヘッドライト = 消灯 / サイドライト = 点灯
3 ヘッドライト = 点灯 / サイドライト = 点灯
1.0 BRAKE 0 ブレーキランプを消灯します。
1 ブレーキランプを点灯します。
COVER 0 エンジンカバーを非表示にします(エンジンを観察することができます)。
1 エンジンカバーを表示します。

translating from Japanese

1) Vehicles' Interactive Add-on System
2) 子プリムのオブジェクト名も SEAT
3) テクスチャーアニメーション