Include instruction

The content of an SDL file can conveniently be divided into thematic files. It's also possible to extract common fragments of component descriptions and settings into separate files. Such files use the .inc or .ext extensions.

The content of these files can be invoked at the required location using the include instruction with the filename enclosed in double quotes. If the file is not in the same folder as the SDL being assembled, then the path from the root folder of the package should be specified.

Template for calling the include instruction

(include "[path]\filename" [args])
  • [path] - the file path, optional

  • filename - the file name

  • [args] - arguments, optional

Example of calling the include instruction
;SDL
(include "human_grenade_throw_type.inc")
(include "human_lie.inc")
(include "human_swim.inc")
(include "human_snipe.inc")
(include "human_squat.inc")
(include "human_bazooka.inc")
(include "human_inventory.inc")
(include "human_look.inc")
(include "human_stand.inc")
(include "human_idle.inc")
(include "human_idle_temp.inc")
(include "human_hands.inc")
(include "human_death.inc")

The content of the human.set file is assembled from several SDL files that are located in the same folder as the human.set file

When calling the include instruction, you can pass argument values.

Example

(include "shadow/stone.inc" sx(1) sy(3))

Other examples of using the include instruction are provided in the table below.

FilenameDescription

human_death.inc

For convenience, this file contains the description of death animations for a human unit. The contents of human_death.inc are included in the human.set file using the include instruction.

vehicle.ext

This file contains common properties for vehicle type units. Its contents are called in files describing properties of units that are subtypes of vehicle: car, moto, airborne, marine, etc.

presets_vehicles.inc

This file contains settings for vehicle unit presets. The contents of this file are called using the include instruction in all files describing game modes that use the presets described in presets_vehicles.inc.

If you have difficulties understanding the terminology and the essence of the instruction description, please refer to the article Basic knowledge about configuration files.

Additionally, you can explore other types of Instructions.

Last updated