Arma 2 OA: Multiple Mission Parameters Configuration: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
Lou Montana (talk | contribs) m (Text replacement - "Operation Flashpoint:Dedicated Server" to "Operation Flashpoint: Dedicated Server") |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
=== {{arma2oa}} - multiple mission parameters configuration === | |||
=== | |||
Starting rev.72235 (22.7.2010) the Operation Arrowhead should be able not only to use multiple mission parameters, but also configure their defaults in ''server.cfg'' config file. | Starting rev.72235 (22.7.2010) the Operation Arrowhead should be able not only to use multiple mission parameters, but also configure their defaults in ''server.cfg'' config file. | ||
Below is a short example of how it was tested when implemented. Feel free to rewrite this part of article, as I only want to stop speculations how these parameters are to be configured. This should be considered as a documentation just after implementation. | Below is a short example of how it was tested when implemented. Feel free to rewrite this part of article, as I only want to stop speculations how these parameters are to be configured. This should be considered as a documentation just after implementation. | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
// | // Description.ext file: definition of parameters with their defaults. | ||
// These default values can be overwritten in the server.cfg, as shown in the following list | // These default values can be overwritten in the server.cfg, as shown in the following list | ||
titleParam1 = "Secretary dress"; | titleParam1 = "Secretary dress"; | ||
valuesParam1[] = {0, 1, 2, 3}; | valuesParam1[] = { 0, 1, 2, 3 }; | ||
defValueParam1 = 0; | defValueParam1 = 0; | ||
textsParam1[] = {"Bikini", "Miniskirt", "Tunic", "Jeans"}; | textsParam1[] = { "Bikini", "Miniskirt", "Tunic", "Jeans" }; | ||
titleParam2 = "Secretary age"; | titleParam2 = "Secretary age"; | ||
valuesParam2[] = {18, 20, 26, 30, 35, 80}; | valuesParam2[] = { 18, 20, 26, 30, 35, 80 }; | ||
defValueParam2 = 26; | defValueParam2 = 26; | ||
textsParam2[] = {"18", "20", "26", "30", "35", "Baba Jaga"}; | textsParam2[] = { "18", "20", "26", "30", "35", "Baba Jaga" }; | ||
class Params | class Params | ||
{ | { | ||
class Name | class Name | ||
{ | { | ||
title = "Secretary name"; | title = "Secretary name"; | ||
values[] = {0, 1, 2, 3}; | values[] = { 0, 1, 2, 3 }; | ||
texts[] = {"Iveta", "Mila", "Misa", "Bara"}; | texts[] = { "Iveta", "Mila", "Misa", "Bara" }; | ||
default = 3; | default = 3; | ||
}; | }; | ||
Line 44: | Line 44: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Inside ''server.cfg'' one can define the | Inside ''server.cfg'' one can define the {{hl|param1}} and {{hl|param2}} values along with new, named parameters inside ''class Params'', using each parameter ''class name'' to assign the corresponding parameter the value. | ||
:The '''paramsArray''' cannot be used inside ''server.cfg'' config file (or you can use it, but the engine | :The '''paramsArray''' cannot be used inside ''server.cfg'' config file (or you can use it, but the engine will not read it :) ). | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="cpp"> | ||
class Missions | class Missions | ||
{ | { | ||
Line 52: | Line 52: | ||
{ | { | ||
template = "parametersTest.Desert_E"; // omit the .pbo suffix | template = "parametersTest.Desert_E"; // omit the .pbo suffix | ||
difficulty = "regular"; | difficulty = "regular"; // difficulty: recruit, regular, veteran & mercenary as specified in *.Arma2profile | ||
param1 = 2; | param1 = 2; // dress | ||
param2 = 26; | param2 = 26; // age | ||
class Params | class Params | ||
{ | { | ||
Line 65: | Line 65: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | |||
*[[ArmA: Server configuration|Server Configuration]] | == See Also == | ||
*[[Armed Assault:Dedicated Server]] | |||
*[[ArmA: Server Side Scripting]] | * [[Arma 3: Server Config File|server config]] | ||
*[[Operation Flashpoint:Dedicated Server]] | * [[ArmA: Server configuration|Server Configuration]] | ||
*[[ | * [[Armed Assault:Dedicated Server]] | ||
*[[ | * [[ArmA: Server Side Scripting]] | ||
*[[ | * [[Operation Flashpoint: Dedicated Server]] | ||
*[[Arma: | * [[Arma 3: Headless Client]] | ||
*[[ | * [[Arma 3: Server Security]] | ||
* [[Arma 3: Mission voting]] | |||
* [[Arma: Mission rotation]] | |||
* [[Arma 2 Mission Rotation]] | |||
[[Category:Arma 2: Multiplayer|Server.cfg]] | [[Category:Arma 2: Multiplayer|Server.cfg]] | ||
Latest revision as of 17:29, 26 July 2024
Arma 2: Operation Arrowhead - multiple mission parameters configuration
Starting rev.72235 (22.7.2010) the Operation Arrowhead should be able not only to use multiple mission parameters, but also configure their defaults in server.cfg config file.
Below is a short example of how it was tested when implemented. Feel free to rewrite this part of article, as I only want to stop speculations how these parameters are to be configured. This should be considered as a documentation just after implementation.
// Description.ext file: definition of parameters with their defaults.
// These default values can be overwritten in the server.cfg, as shown in the following list
titleParam1 = "Secretary dress";
valuesParam1[] = { 0, 1, 2, 3 };
defValueParam1 = 0;
textsParam1[] = { "Bikini", "Miniskirt", "Tunic", "Jeans" };
titleParam2 = "Secretary age";
valuesParam2[] = { 18, 20, 26, 30, 35, 80 };
defValueParam2 = 26;
textsParam2[] = { "18", "20", "26", "30", "35", "Baba Jaga" };
class Params
{
class Name
{
title = "Secretary name";
values[] = { 0, 1, 2, 3 };
texts[] = { "Iveta", "Mila", "Misa", "Bara" };
default = 3;
};
class WorkPlace
{
title = "Secretary place";
values[] = {0, 1};
texts[] = {"Prague","Mnisek"};
default = 1;
};
class Friend
{
title = "Her friend"
values[] = {0, 1};
texts[] = {"None","Bebul"};
default = 1;
};
};
Inside server.cfg one can define the param1 and param2 values along with new, named parameters inside class Params, using each parameter class name to assign the corresponding parameter the value.
- The paramsArray cannot be used inside server.cfg config file (or you can use it, but the engine will not read it :) ).
class Missions
{
class CanBeAnything // name for the mission, can be anything
{
template = "parametersTest.Desert_E"; // omit the .pbo suffix
difficulty = "regular"; // difficulty: recruit, regular, veteran & mercenary as specified in *.Arma2profile
param1 = 2; // dress
param2 = 26; // age
class Params
{
Name = 2;
WorkPlace = 0;
Friend = 1;
};
};
};