C3Fire

Difference between revisions of "Config/Session Example"

From C3LearningLabs
 
(31 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:Session Example}}
 
{{DISPLAYTITLE:Session Example}}
  
 +
=== Configuration Naming Convention ===
 +
 +
:The configuration names are like  <code>P4-F9L3R2D1</code> where the letters represent.
 +
<br>
 +
::P = Players
 +
::F = Fire fighting unit
 +
::B = Fire break unit
 +
::L = Logistics unit (Water)
 +
::W = Water Logistics unit
 +
::G = Fuel Logistics unit
 +
::R = Rescue service unit (Search and transport people)
 +
::R = Reconnaissance unit (Search people)
 +
::T = Transport unit (Transport People)
 +
::D = Drone
 +
::UAV = Drone
 +
<br>
 +
::Number after each letter is the amount of each type.
 +
<br>
 +
 +
;Example
 +
:P4-F9L3R2D1
 +
 +
::P4 = 4 Players
 +
::F9 = 9 fire fighting units
 +
::L3 = 3 Logistics units
 +
::R2 = 2 Rescues service units
 +
::D1 = 1 Drone
  
 
= Demo Configurations =
 
= Demo Configurations =
Line 27: Line 54:
 
:[[Config/Session_Example/Demo/P1-F4UAV1|P1-F4UAV1]]
 
:[[Config/Session_Example/Demo/P1-F4UAV1|P1-F4UAV1]]
 
:[[Config/Session_Example/Demo/P2-F4UAV1|P2-F4UAV1]]
 
:[[Config/Session_Example/Demo/P2-F4UAV1|P2-F4UAV1]]
 
+
<br>
 
 
 
<br>
 
<br>
  
 
= Project Configurations =
 
= Project Configurations =
The following demo configurations are included in the installation
+
The following projects configurations are included in the installation
 
<br>
 
<br>
  
 
{{Multicol}}  
 
{{Multicol}}  
*[[Config/Session_Example/Project/P4-F9L3R2Uav1-3x15min|P4-F9L3R2Uav1-3x15min]]
+
*[[Config/Session_Example/Project/P3-F6L2R2D1|P3-F6L2R2D1]]
*[[Config/Session_Example/Project/P4-F8L2R2B1Uav1-3x15min|P4-F8L2R2B1Uav1-3x15min]]
+
*[[Config/Session_Example/Project/P4-F9L3R2Uav1-3x15min|P4-F9L3R2D1-3x15min]]
 +
::Variations: Chat
 +
*[[Config/Session_Example/Project/P4-F8L2R2B1Uav1-3x15min|P4-F8L2R2B1D1-3x15min]]
 +
::Variations: Chat
 +
 
  
  
 +
{{Multicol-break}}
 +
*[[Config/Session_Example/Project/P4-F8B2L3D1-3x15min|P4-F8B2L3D1-3x15min]]
 +
*[[Config/Session_Example/Project/P4-F2FB1L1|P4-F2FB1L1-3x20min]]
  
  
{{Multicol-break}}
 
 
*[[Project/2017-SweCanTeam-1|SweCanTeam-1]]
 
*[[Project/2017-SweCanTeam-1|SweCanTeam-1]]
  
Line 49: Line 81:
  
 
{{Multicol-end}}
 
{{Multicol-end}}
 +
 +
<br>
 
<br>
 
<br>
 
+
&emsp;&emsp;&emsp;&emsp;
= Copy existing configuration =
 
 
 
== Set Default Configuration Files ==
 
 
 
To make the change easy set the default configuration files,<br>
 
So you don't need to manually select them when developing the new configuration.
 
 
 
Edit the file you uses<br>
 
C3FireClientConfig-Lin.xml<br>
 
C3FireClientConfig-Mac.xml<br>
 
C3FireClientConfig-Win.xml<br>
 
 
 
<source>
 
<DefaultFiles
 
  SessionConfigDirectory  = "../../SessionDef/<CONFIG-FOLDER>"
 
  ...
 
  ScenarioDirectory        = "../../SessionDef/<CONFIG-FOLDER>"
 
  ...
 
  SessionConfigFile        = "<FILE_NAME>.con"
 
  ...
 
  ScenarioFile              = "<FILE_NAME>.sce"
 
</source>
 
 
 
{| class="wikitable"
 
|+
 
|-
 
!style="text-align: left;" |
 
Property
 
!style="text-align: left;" |
 
Value
 
|-
 
|style="background-color:#bbeeff; vertical-align: text-top;"|
 
SessionConfigDirectory
 
|style="vertical-align: text-top;"|
 
The default directory where the session configuration files are stored. This property does not need to be<br> defined.
 
 
 
Value example = "C:\c3fire\server\SessionConfig"
 
|-
 
|style="background-color:#bbeeff; vertical-align: text-top;"|
 
ScenarioDirectory
 
|style="vertical-align: text-top;"|
 
The default directory where the session scenario configuration files are stored. This property does not need<br> to be defined.
 
 
 
Value example = "C:\c3fire\server\SessionScenario"
 
|-
 
|style="background-color:#bbeeff; vertical-align: text-top;"|
 
SessionConfigFile
 
|style="vertical-align: text-top;"|
 
The session configuration default file. This property does not need to be defined.
 
 
 
Value example = "XY.con"
 
|-
 
|style="background-color:#bbeeff; vertical-align: text-top;"|
 
ScenarioFile
 
|style="vertical-align: text-top;"|
 
The session scenario default file. This property does not need to be defined.
 
 
 
Value example = "Dev.sce"
 
|-
 
|}
 
 
 
== Linux Commands==
 
 
 
===Rename multiple files in folder===
 
:Install Linux: <code>sudo apt-get install mmv</code><br>
 
:Install Mac: <code>brew install mmv</code><br>
 
 
 
:<code>mmv <FROM>\* <TO>\#1</code><br>
 
 
 
Example:<br>
 
<source>$ ls
 
a1.txt a2.txt a3.txt
 
mmv a\* b\#1
 
ls
 
b1.txt b2.txt b3.txt</source>
 
 
 
Example:<br>
 
 
 
:;Mac
 
:<code>cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1</code><br>
 
:<code>mmv P8F3WR3U2\* P4FWRU\#1</code>
 
 
 
:;Linux
 
:<code>cd /home/rego/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1</code><br>
 
:<code>mmv P8F3WR3U2\* P4FWRU\#1</code>
 
 
 
:;WSL Window Subsystem Linux
 
:<code>cd /mnt/c/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1</code><br>
 
:<code>mmv P8F3WR3U2\* P4FWRU\#1</code>
 
 
 
===Replace string in multiple files===
 
 
 
:<code>sudo find . -type f -name "*.txt" -print0 | xargs -0 sed -i "" -e 's/[FROM]/[TO]/g'</code>
 
 
 
Example:<br>
 
 
 
:;Mac
 
:<code>cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1</code>
 
:<code>sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'</code>
 
 
 
 
 
:'''Linux'''  (Works but give error message "sed: can't read : No such file or directory")
 
:<code>cd /Users/regogranlund/dev/C3Systems/C3Systems/resources/C3Fire/SessionDef/P4FWRU-1</code>
 
:<code>sudo find . -type f -name "*.con*" -print0 | xargs -0 sed -i "" -e 's/P8F3WR3U2/P4FWRU/g'</code>
 

Latest revision as of 12:55, 26 September 2023


Configuration Naming Convention

The configuration names are like P4-F9L3R2D1 where the letters represent.


P = Players
F = Fire fighting unit
B = Fire break unit
L = Logistics unit (Water)
W = Water Logistics unit
G = Fuel Logistics unit
R = Rescue service unit (Search and transport people)
R = Reconnaissance unit (Search people)
T = Transport unit (Transport People)
D = Drone
UAV = Drone


Number after each letter is the amount of each type.


Example
P4-F9L3R2D1
P4 = 4 Players
F9 = 9 fire fighting units
L3 = 3 Logistics units
R2 = 2 Rescues service units
D1 = 1 Drone

Demo Configurations

The following demo configurations are included in the installation


FireFighting
P1-F4
P2-F8
LogisticsWater
P1-F4W2
LogisticsWaterFuel
P1-F4W1G1
FireBreak
P1-F4B1
P1-F8B4
RescuePersons
P1-F2R1T1
UAV
P1-F4UAV1
P2-F4UAV1



Project Configurations

The following projects configurations are included in the installation