C3Fire

Difference between revisions of "Config/Config Create New"

From C3LearningLabs
Line 66: Line 66:
 
= Copy an old configuration =
 
= Copy an old configuration =
  
 
+
Copy an configuration folder and update the following main steps.
  
 
== Organisation ==
 
== Organisation ==

Revision as of 10:25, 26 September 2023


Create New Configuration

Set Default Configuration Files

When you load a session you needs to select what configuration file to load.
To make the start up proses easy, you can set the default configuration files,
so you don't need to manually select them when developing the new configuration.

Edit the file you uses
C3FireClientConfig-Lin.xml
C3FireClientConfig-Mac.xml
C3FireClientConfig-Win.xml

<DefaultFiles 
  SessionConfigDirectory   = "../../SessionDef/<CONFIG-FOLDER>"
  ...
  ScenarioDirectory        = "../../SessionDef/<CONFIG-FOLDER>"
  ...
  SessionConfigFile         = "<FILE_NAME>.con"
  ...
  ScenarioFile              = "<FILE_NAME>.sce"

Property

Value

SessionConfigDirectory

The default directory where the session configuration files are stored. This property does not need to be
defined.

Value example = "C:\c3fire\server\SessionConfig"

ScenarioDirectory

The default directory where the session scenario configuration files are stored. This property does not need
to be defined.

Value example = "C:\c3fire\server\SessionScenario"

SessionConfigFile

The session configuration default file. This property does not need to be defined.

Value example = "XY.con"

ScenarioFile

The session scenario default file. This property does not need to be defined.

Value example = "Dev.sce"

Copy an old configuration

Copy an configuration folder and update the following main steps.

Organisation

Copy the new roles and update

File name: xx-Global-Roles.coni

<Roles>
  <Role
      IDName = "A"
      LongName = "Chief"

      ControlUnits = "D13"

      MailSendTo = "B,C,E,G,H,I,K"
      MapDBTo = ""

Units

Copy the new Units and update
Update the numbers for the units images

File name: xx-Global-Units.coni

<Units>
  <Unit
      IDName = "F1"
      LongName = "Firefighter Unit 1"

      SendInfoTo = "C"

      ImageGoTo = "Unit\Number\White\1-White.gif"
      ImageGoToSelected = "Unit\Number\White\1-White-Selected.gif"
      ImagePos = "Unit\Number\Red\1-Red.gif"
      ImagePosSelected = "Unit\Number\Red\1-Red-Selected.gif"

UAVs

Copy the new UAV and update
Update the numbers for the UAV's images
Update who is controlling the UAV at start.

File name example: xx-Main-ss.con

<UAVs>

    <UAV
      IDName = "D15"
      ControllerActive = "A"

Map

Roles Map Scroll Positions

Add the new roles and Update all roles map scroll positions.

File name: xx-yy-RolesScrollPos.coni

  <RolesScrollPos>

    <Role
      IDName = "A"
      MapStartCenterScrollPos = "20,20"

Units Map Positions

Add the new units and update all units map positions.

File name: xx-yy-UnitsPos.coni

  <UnitsPos>

    <Unit
      IDName = "F1"
      Pos = "18,18" />

UAVs Map Positions

Add the new UAVs and update all UAVs map positions.

File name: xx-yy-UAVsPos.coni

  <UAVsPos>

    <UAV
      IDName = "D15"
      HomeBasePos = "20,20" />

UnitInfoDisplay

UnitInfoDisplay

UnitInfoDisplayOutline

Update unit information outline display. Update if Water or Fuel level should be visible.

File name: xx-Global-UIMain-zz.coni

    <UnitInfoDisplayOutline
      Name = "Ground Chief Info" >

      ...

      <UnitInfoDisplayOutlineCol
        Property = "WaterLevel"
        PropertyType = "String"
        width = "50" />

      <UnitInfoDisplayOutlineCol
        Property = "FuelLevel"
        PropertyType = "String"
        width = "50" />

    </UnitInfoDisplayOutline>

Error messages

Old Unit pos configurations

If you converting an old configuration file and get this error.
You should update unit pos definitions.
Move units position from the elements in <Units> to the elements in <UnitsPos>.
In <Modules> element set Unit = true
In <Modules> element set MapObjects = "True"

Unable to parse session configuration. Error while parsing the tag <Units>
Error report generated by c3systems.global.sessionData.SessionConfigParser.parseSessionConfiguration<Units>