# Red Hammer Studios

## RHS T-54/55 Pack

### Scripts

#### Introduction

Please read that section carefully. It contains all information about the usage and configuration of the scripts. Addon authors will not reply on the e-mails and posts with questions that are answered here.

#### Global control variables

Disabling all scripts may be helpfull for troubleshooting or when using RHS addons with mods which affect other addons globally.

To disable all scripts in all RHS addons, cast this line in global place:

`RHS_NoScripts = true`

Disabling or reducing smoke effects by 50% may be helpfull on less powerfull computers.

To disable smoke effects in all RHS addons, cast this line in global place:

`RHS_SmokeOff = true`

To reduce smoke effects in all RHS addons, cast this line in global place:

`RHS_LowSmoke = true`

Remember: these settings are global, they affect all RHS addons.

#### Local control variables

Disabling all T-54/55 Pack scripts only may be helpfull for troubleshooting or when critical bug discovered in the release.

To disable all T-54/55 Pack scripts, cast this line in global place:

`RHS_T55_NoScripts = true`

#### Emblems/numbers modification script - generator

The T-54/55 Pack addon has been featured with a scripted interface, that controls the appearance of painted emblems and numbers. All vehicles in this pack have some initial settings, defining their appearance according to the nationality of the tank. The side number is generated randomly by default . If you want to change the default emblems or numbers, you have to enter a command into the init line. The mechanism controlling the appearance is highly elastic, it means that it is possible to place any set of numbers/emblems on any vehicle from the addon.

If you want to go an easy way, you may use a command generator, linked below. After clicking, a new window will appear, when you may set the emblems/numbers parameters. The command line is placed in a big edit text at the bottom of the form. After setting up the parameters, you need to select all text in the edit box (click inside and press `ctrl-a`), copy it (`ctrl-c`) and paste into init field in game (`ctrl-v`).

[Generator]

The above generator, however, does not able you to use all functions of the script. If you have more than basic OFP scripting knowledge, below you may find a complete documentation on the `RHS_UN.sqs` script usage.

MP note: all scripts (appearance control, emblem/number modification) have to be executed on every client.

#### Emblems/numbers modification script - documentation

The line below presents the script calling syntax:

`[<object>,<number_type>,[<number_1>,<number_2>,<number_3>], [<emblem_small>,<chance>],[<emblem_big>,<chance>]] exec "\RHS_Misc\RHS_UN.sqs"`

Field: | Definition:
`<object>` | Stands for the object name, on which the script should work (the object must be a playable tank from the RHS T-54/55 Pack). If you call the script in the selected tank's init line, you may use a `this` value as an object name.

`<number_type>`

Defines the type of font to be used on tank, as well as the method of creation. There are two types of creation, random and definable. If you use the definable type, as the next argument you have to supply the digits to be placed on the tank. If you use the random type, the digits will be selected at random by the script.
The definable type:
`"normal"` - latin alphabet, cardboard cut
`"arabic"` - arabic alphabet, cardboard cut
`"resi"` - latin alphabet, spraypaint
The random type:
`"randomNormal"` - latin alphabet, cardboard cut
`"randomArabic"` - arabic alphabet, cardboard cut
`"randomResi"` - latin alphabet, spraypaint
You may also hide the number:
`"none"` - no number (treat like random type)
Remember about quotation marks!

`[<number_1>, <number_2>, <number_3>]` | An array of three numbers, defining the value of the three following digits of the side number, from left to right. Each of the array's elements must be a digit of [0,9]. If you have chosen a font of the random type (see above), you omit this argument (whole array).

`<emblem_small>`
`<emblem_big>`

These arguments have a common value choice. The value defines, which graphic has to be displayed on the tank. Each tank model has 1-2 graphic placeholders defined by `<emblem_big>` 1-2 graphic placeholders defined by `<emblem_small>`.
The values can be divided into two types, physical (pointing actual image) and functional (script instructions). Below, there is a list of physical values:
Soviet group emblems:
`"emb1"` - Square
`"emb2"` - Triangle
Soviet distinctions:
`"russ"` - Gvardija
National insignia:
`"gdr"` - German Democratic Republic
`"iraq"` - Iraq (1st Regiment)
`"china"` - China
`"czech"` - Chechoslovakia
`"finn"` - Finnland
`"resi"` - Resistance (White Bear)
`"fia"` - Resistance (FIA marking)
`"viet"` - North Vietnam
`"pol1"` - Poland (Eagle)
`"pol2"` - Poland (Checkboard)
To hide an emblem in a selected emblem field, give the argument a functional value of `"no"`.
For the `<emblem_small>`, you may use a functional value `"random"`. In this case, a value will be randomly choosen within `"emb1"`, `"emb2"` and `"no"`.
In case of both arguments, you have also another type of value. You may supply a path to outside image source (either image placed in mission folder, in own `.pbo` file or in a `.pbo` file of another addon maker). The image file must be of `.paa` format. Unfortunately, this value type does not work in MP.

`<chance>`

This argument defines a chance of appearance for the paired `<emblem_xxx>`, as long as the `<emblem_xxx>` has a physical type value or a path to an image.
The chance is represented in a scale of [0-10], which mathematically is a probability factor multiplied by 10. Do not write quotation marks in case of this value.
You may omit this value, if you want the emblem to be visible always, without probability calculation. If omited, the default value of 10 is used.

MP note: all scripts (appearance control, emblem/number modification) have to be executed on every client.

Examples:

`[this, "randomArabic", ["none"], ["iraq", 9]] exec "\RHS_Misc\RHS_UN.sqs"`
- tank has a random arabic number, an empty large emblem and a small Iraqi 1st Regiment emblem with a 90% probability of it's appearance.

`[this, "normal", [1,0,2], ["pol2", 3], ["pol1"]] exec "\RHS_Misc\RHS_UN.sqs"`
- tank has a Polish insignia (big red and white checkboard and rarely a small white eagle), and a side number "102".

`[this, "none", ["no"], ["no"]] exec "\RHS_Misc\RHS_UN.sqs"`
- tank has no emblems and no numbers.

#### Appearance control script

There are several elements of vehicle's appearance, that may be modified via the script interface:

T-54/55 series tanks have a special mounts on the rear part of the vehicle. They are used to carry the fuel barrels to enhance a maximum fuel capacity and thus - a range of the vehicle. These barrels, however, could cause a potential danger for the tank during combat, as due to their exposure they are easy to hit and due to the content they may damage the tank when hit. Barrels make it also difficult to fire backwards. Therefore, they are ussually ejected before combat or when the combat begins. Sometimes the barrels are also mounted in combat filled with sand, to protect the rear part of the tank.

In this addon pack, the barrels are by default not mounted (hidden). They also serve no purpose, as the internal fuel capacity of the tank is far enough for the islands fitting the game engine. Cast one of the following lines in init field to:

`this exec "\RHS_Misc\RHS_barrelsOn.sqs"` - show barrels

`this exec "\RHS_Misc\RHS_barrelsOff.sqs"` - hide barrels (default)

The T-54/55 Pack features a resistance tanks with an optional/random camouflage netting. By default, the netting appears at random. You may take over the control of the netting by casting one of the following lines in init field to:

`this exec "\RHS_Misc\RHS_nettingsOn.sqs"` - show netting

`this exec "\RHS_Misc\RHS_nettingsOff.sqs"` - hide netting

MP note: all scripts (appearance control, emblem/number modification) have to be executed on every client.

#### Cargo Script - transporting soldiers on hull

The Cargo Script works to simulate transporting soldiers on hull. While the original ingame OFP soldier engine has been not programmed for this task, the script decides for the soldier to jump off the vehicle when dangerous situation ecountered, as well as it takes care for the main gun barrel not to collide with the transported soldier models (by fixing it's position).

The Algorithm's work is based on a state of the driver and gunner. Shortly, the script constantly probes, if the driver drives with his hatch closed and if the gunner is present in the vehicle. Transporting the soldiers on the hull is possible only when at least one of the two following conditions is true:

[driver's hatch is open] or [there is no gunner]

When the gunner disembarks the tank, the main gun is automatically centered (same as when driver's hatch is open), to prevent main barrel from clipping with soldier's models. If the soldier transport conditions are not fulfilled, nearby soldiers's `"Ride in T-5xxx"` action becomes locked. If the soldier transport conditions are discovered not to be fulfilled during ride (eg. when driver closes his hatch) or when the tank fires - soldiers are ejected from tank.

Hint: You may transport soldiers only, when a driver's hatch is opened or there is no gunner. If the soldier squad is already sitting on the vehicle, and you want the gunner and driver to get in that vehicle, do it in the following order: firstly order the driver to get in and open hatch, then order the gunner to get in.

Hint: To order the driver to open the hatch, commander has to announce "SAFE" status.

It is possible to disable the cargo script for troubleshooting, or when it occures there is a critical bug found in the cargo script. Simply cast this line in global place:

`RHS_NoCargoScripts = true`

This will, however, lock the cargo transport feature completely. Remember: this setting is global, it affects all RHS addons.

#### Shell ejection script

The T-54/55 Pack features a script that simulates the main gun shell ejection from the tank. The empty shells stay on the ground. The script has been implemented mainly for the realism and fun, but it may play a very nice part in your mission - especially if you are creative. You may also put the shells manually to add a touch to the scene (use `/EMPTY/RHS Misc/RHS Shell`).

The feature may be turned off if desired so. To disable the feature cast this line in global place:

`RHS_NoShellEject = true`

Remember: this setting is global, it affects all RHS addons.

[go to online readme index]