переведи на русский:


[b]Information for modelers[/b]:[list=none][*]If you don't do vehicle modifications, this information may or may not become useless for you, but have a read if you wish to, no harm there!

[b]Setting up a siren[/b]:[list=none][*]Every model with an AVS siren must be configured with a JSON manifest, without a JSON manifest, AVS won't see the model as being AVS adapted. The setup of a siren manifest is straight forward, it's an object with the keys being the state which is toggled through R. The default state will [b]always[/b] be the first key. There's no limit on how many states there can be.

Every key in a state must be a number formatted as a string, the number indicates which material index it controls. If you don't want materials to be lit up, you can set it to any number above 255, and the coronas will still light up. An siren configuration consists out of 4 simple properties:
[CODE=json][codefix]"size": 0.2,

"color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

"state": 1,

"pattern": [ 400, 100 ][/codefix][/CODE]


[list=none][*]The [b]size[/b] property is a float value, it dictates the size of the corona. For comparison, a headlight is ~0.3.
[*]The [b]color[/b] property is an object with 4 integer properties, RGBA, the value can be a decimal or hexadecimal, as long as the value is between 0 and 255.
[*]The [b]state[/b] property is an integer read as a boolean (it will be changed to a boolean, but for now refer to 1 or 0); it dictates the starting state of the siren.
[*]The [b]pattern[/b] property is an array of integers that represent milliseconds, leaving the array empty ([ ]) makes it a steady burn; the milliseconds [b]does not stack[/b], unlike IVF. They execute after each other.[list=none][*]If you have a lot of sirens, try and make the total millisecond count from the patterns the same; they will reset together after 1 of them has executed fully.
When the pattern is reset, the state resets to its starting state, regardless of the new state through the pattern; you can work around this by adding a 0ms stage to the end of the pattern.
Taking the aforementioned statement into consideration, states cannot contain a single pattern interval as it would constantly reset to its starting state. Therefore, the interval must be repeated twice; e.g. to change state each 500ms, the interval array would be [ 500, 500 ][/list]
[*][b]type[/b] [i](BETA Build 2+)[/i]: this is a property inherited from ImVehFt, it has 3 acceptable inputs: [b]directional[/b] (IVF type 0), [b]inversed-directional[/b] (IVF type 1), and [b]non-directional[/b] (IVF type 4); you do not need to enter this property, as it will default to [b]directional[/b].[list=none][*]Use [b]inversed-directional[/b] if you're modifying an ImVehFt configuration and it used to be IVF type 1; meaning inversed rotated (forwards becomes backwards).
[*]Use [b]non-directional[/b] if you want the corona to be seen from [i]all[/i] angles.[/list][/list]

The mentioned material index is the material's [b]red[/b] decimal index (1-255), 0 is unusable as the game overwrites it; [linethrough]right now - the green and blue colors are not checked for, however, you should put them as 255 (regardless, they're changed by the plugin), I may make that restriction in the future.[/linethrough] [i]Since BETA Build 2+[/i]: the green and blue color [b]must[/b] be 255 to be recognized.

In order for a material to be recognized as a siren material, the texture must also begin with [b]siren[/b]; thus [b]sirenlights128[/b] would be an acceptable texture name for a texture of size 128x128.

An example of a full siren configuration is:
[CODE=json][codefix]{

    "emergency": {

        "1": {

            "size": 0.2,

            "color": { "red": 255, "green": 255, "blue": 255, "alpha": 128 },

            "state": 1,

            "pattern": [ 333, 333 ]

        },





        "2": {

            "size": 0.2,

            "color": { "red": 255, "green": 255, "blue": 255, "alpha": 128 },

            "state": 0,

            "pattern": [ 333, 333 ]

        },





        "3": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        },





        "4": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        },





        "5": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 500, 500, 1000, 500, 500, 500 ]

        },





        "6": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 1,

            "pattern": [ 500, 500, 1000, 500, 500, 500  ]

        },





        "7": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 0,

            "pattern": [ 100, 400, 500, 1000, 500, 400, 600 ]

        },





        "8": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 0,

            "pattern": [ 100, 400, 500, 1000, 500, 400, 600 ]

        },





        "9": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 0,

            "pattern": [ 200, 300, 500, 1000, 500, 300, 700 ]

        },





        "10": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 0,

            "pattern": [ 200, 300, 500, 1000, 500, 300, 700 ]

        },





        "11": {

            "size": 0.2,

            "color": { "red": 255, "green": 98, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 600, 600 ]

        },





        "12": {

            "size": 0.2,

            "color": { "red": 255, "green": 98, "blue": 0, "alpha": 128 },

            "state": 0,

            "pattern": [ 600, 600 ]

        },





        "13": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 200, 200 ]

        },





        "14": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 1,

            "pattern": [ 200, 200 ]

        },





        "15": {

            "size": 0.2,

            "color": { "red": 255, "green": 98, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 600, 600 ]

        },





        "16": {

            "size": 0.3,

            "color": { "red": 255, "green": 255, "blue": 255, "alpha": 128 },

            "state": 1,

            "pattern": [ 500, 500 ]

        },





        "17": {

            "size": 0.3,

            "color": { "red": 255, "green": 255, "blue": 255, "alpha": 128 },

            "state": 0,

            "pattern": [ 500, 500 ]

        },





        "18": {

            "size": 0.2,

            "color": { "red": 255, "green": 255, "blue": 255, "alpha": 128 },

            "state": 0,

            "pattern": [ 1000, 50, 100, 50 ]

        }

    },





    "hazard": {

        "3": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        },





        "4": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        },





        "11": {

            "size": 0.2,

            "color": { "red": 255, "green": 98, "blue": 0, "alpha": 128 },

            "state": 0,

            "pattern": [ 500, 500 ]

        },





        "13": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 500, 500 ]

        },





        "14": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 0,

            "pattern": [ 500, 500 ]

        },





        "15": {

            "size": 0.2,

            "color": { "red": 255, "green": 98, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ 500, 500 ]

        }

    },





    "steady burn": {

        "3": {

            "size": 0.2,

            "color": { "red": 255, "green": 0, "blue": 0, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        },





        "4": {

            "size": 0.2,

            "color": { "red": 0, "green": 98, "blue": 233, "alpha": 128 },

            "state": 1,

            "pattern": [ ]

        }

    }

}[/codefix][/CODE]


With the siren materials and settings configured, all that's remaining is the coronas. They are dummy objects. They must begin with the name [b]sirenX[/b], X standing for the material index it's connected to. With that said, there can be an infinitive amount of duplicates; e.g. you can have [b]siren1[/b], [b]siren1.01[/b], [b]siren1.02[/b] all working perfectly fine, for as far as the game allows. Make Christmas trees, it's December!

The parent object can be anything, up until chassis_dummy; unfortunately, other dummies like boot_dummy appears to not be recognized as a Renderware Frame child because their parent is a mesh object. If you move the dummies out of the chassis, it might work, however.[/list]

[b]Setting up custom head/tail lights[/b]:[list=none][*]AVS, similarly to IVF, allows you to use custom headlights and taillights textures. This comes in handy with models such as the FPIU. The material colors must be red-255 and blue-255. The front left light is green 1, front right 2, taillights 3. Any texture name may be used.[/list]

[b]Setting up paintjobs[/b]:[list=none][*]AVS paint jobs are a very community sided feature. They allow you to set specific paint jobs for specific server vehicle IDs, this allows you to give certain station vehicles certain liveries, and so on. Each vehicle model requires its own JSON manifest, the set-up is simple and self-explanatory:[CODE=json]{
    "0": {
        "identifiers": [ 300, 133, 90, 150 ]
    },
    
    "1": {
        "identifiers": [ 91, 144, 149, 205, 209 ]
    }
}[/code]

Key 0 indicates paint job 0 (in textures, it's 1, e.g. copcarvg1 = paint job 0), identifiers are an array of the vehicle IDs (SA-MP synchronized). This isn't a very stable list, as they [b]may[/b] change on every server restart, however, it's a fun feature, I like it myself![/list]

[b]Setting up spotlights[/b]:[list=none][*]Spotlights are not really... finished... they're still in the works! BUT! They do work! Kind-of. They use a headlight shadow when you hold mouse button 2 (right) while the spotlight is turned on with [b]C[/b]. It's really simple, you create a dummy called [b]spotlight_dummy[/b], then that's it. You can also add a mesh object with the actual spotlight in the dummy's center, then it rotates too. There's no reserved material index for spotlights, [i]yet[/i]![/list]

[b]Modifying ImVehFt models[/b] ([i]BETA Build 2+[/i]):[list=none][*]If you wish to modify an ImVehFt configuration, you can do so. You do not need to keep the EML file but if you remove the EML file, you can no longer reference values from the EML file.

When you use an ImVehFt adapted vehicle with Advanced Vehicle Sirens, it will create its own state, the state is [b]ImVehFt[/b]. If you want to modify the ImVehFt configuration directly, you can reference the red material, the material color is 256 subtracted by the ImVehFt ID, ID 1 becomes 255, 2 becomes 254, 3 becomes 253, 4 becomes 252, etcetera.[list=none][*]To overwrite values from ImVehFt's EML ID 1, you could do this:[CODE=json]{
    "ImVehFt": {
        "255": {
            "size": 1.0,
            "color": { "red": 0, "green": 255, "blue": 0, "alpha": 255 },
            "type": "non-directional"
        }
    }
}[/code]

This will set the size to 1.0, color to green, and type to non-directional (seen from all angles).[/list]

If you want to add another state to an ImVehFt adapted model, you must add a non-optional property [b]ImVehFt[/b] and the value must be true, this for example would add another state called emergency:[CODE=json]{
    "emergency": {
        "255": {
            "size": 1.0,
            "color": { "red": 0, "green": 255, "blue": 0, "alpha": 255 },
            "state": 0,
            "pattern": [ 500, 500 ],
            "type": "directional",
            "ImVehFt": true  
        }
    }
}[/code]

You can mix a JSON manifest to both modify ImVehFt values and add new states.[/list]

[b]Complete material and dummy list[/b]:[list=none][*][b]Material red, green, and blue: dummy — Description[/b]
[*]Material (1 to 255, 255, 255): siren[b]X[/b] — AVS configured sirens.
[*]Material (255, 1, 255): N/A — Front-left headlight
[*]Material (255, 2, 255): N/A — Front-right headlight
[*]Material (255, 3, 255): N/A — Rear taillights
[*]Material (255, 4, 255): IVF Turnlights — Left turnlight
[*]Material (255, 5, 255): IVF Turnlights — Right turnlight[/list]

These are hooked to the ImVehFt materials and dummies, including PRM settings. AVS does not have its own foglight and turn lights set up as of yet, except for the turn lights materials.[/list]