Goto http://www.stucuk.netGoto http://www.atlanticaonlinewiki.comGoto http://www.game-requirements.com

CharacterSelection

From Original War Support Wiki

Jump to: navigation, search

SAIL Functions/C -> CharacterSelection


Description

This function brings up the character selection window allowing the player to assign a team for a mission.
The function returns a list with the selected characters.

Parameters

CharacterSelection(string, min_people, max_people, unit_list, class_list)

string - a string that, apparently, doesn't do anything. Even Altar just uses '1' or something similar here.
min_people, max_people - integer defining respectively the maximum and minimum amount of people the player must pick to proceed.
unit_list - a list containing the characters the player can choose among. The list also contains special commands (see "unit_list commands" below).
class_list - a list containing the classes the characters can be changed to. You can also here select a minimum and maximum amount of people allowed to have a specific class (see "class_list syntax" below for syntax).

unit_list commands

The commands are predefined constants you can insert in "unit_list". They define if characters are already hired, can be hired, can change class and more. A command affects all characters following the command in the list. The commands available are:

sel_hired (default)
The following characters are hired from the beginning.
sel_not_hired
The following characters are not hired from the beginning.

sel_changeable
The following characters can be fired/hired by the player.
sel_not_changeable (default)
The following characters can not be fired/hired by the player.

sel_change_class
The player can change the class of the following characters (to the classes in "class_list").
sel_dont_change_class (default)
The player can not change the class of the following characters.

sel_ignore_class_nation
The following characters can be changed to a class foreign to their nation (like a Russian vs class sniper).
sel_dont_ignore_class_nation (default)
The following characters can not be changed to a class foreign to their nation.

class_list syntax

If you just want the player to be able to change a character's class to a specific class, just add the predefined constant for that class to "class_list" (see SAIL Constants).

[class_soldier, class_scientistic]

If the player must have a minimum amount of people with a specific class, add a list with the predefined constant for that class and an integer defining the minimum amount to "class_list".

[class_soldier, [class_scientistic, 2], class_engineer]  //player must choose at least 2 people with class scientistic

If you want a maximum and minimum amount of people with a specific class, add another integer.

[class_mechanic, [class_sniper, 1, 2], class_engineer]  //player must choose between 1 and 2 snipers
[class_soldier, [class_mortar, 0, 1], class_scientistic]  //player can choose only one character with class mortar

Examples

The player must choose 3 to 4 people for a mission.
Character "John" is hired from the beginning and cannot be fired, and the player cannot change class of "John".
The player can hire and change the class of the following characters: "Bill", "Nathan", "Sam", "Tim", "Vincent" and "Louis". None of these are hired from the beginning.
The player cannot change the class of any of the characters to a class foreign to their nation.
The player can change charaters's class to the following classes: Soldier, mechanic, scientist and engineer.

CharacterSelection('1', 3, 4,
[John, sel_not_hired, sel_changeable, sel_change_class, Bill, Nathan, Sam, Tim, Vincent, Louis],
[class_soldier, class_mechanic, class_scientistic, class_engineer])


The player must choose 4 people for a mission.
Character "Burlac" is hired from the beginning and cannot be fired, but the player can change the class of "Burlac".
Character "Platonov" is not hired from the beginning and cannot be hired, and the player can not change the class of "Platonov".
The player can hire the following characters: "Vledov", "Bergstein", "Adjenko", "Gnyev", "Unchiva" and "Onslovic". None of these are hired from the beginning.
The player can change the class of the following characters: "Vledov", "Bergstein", "Adjenko", "Gnyev" and "Unchiva".
The player can change character's class to a class foreign to their nation.
The available classes to change to is: Mortar, sniper, soldier, mechanic, engineer and scientist.
The player must choose at least 1 engineer and maximum 2 snipers.

CharacterSelection('1', 4, 4,

[sel_ignore_class_nation,
 sel_change_class, Burlac,
 sel_not_hired, sel_dont_change_class, Platonov,
 sel_changeable, Onslovic,
 sel_change_class, Vledov, Bergstein, Adjenko, Unchiva],

[class_mortar, [class_sniper, 0, 2], class_mechanic, [class_engineer, 1], class_scientistic])

Some notes

Characters who are hired from the beginning and cannot be fired will NOT be a part of the output list! ("Burlac" and "John" in the examples above)

Personal tools
Clanbase
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Cannot contact the database server: MySQL functions missing, have you compiled PHP with the --with-mysql option? )


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.