Map Object Configuration
Object Types
The xml element ObjectTypes defines all the geographical object types in a session.
<ObjectTypes>
<ObjectType>
<ObjectType>
...
<ObjectType>
</ObjectTypes>
The xml element ObjectType defines a geographical object type and contain a set of basic properties. Beside the basic properties the activated modules can add properties for the ObjectTypes. See documentation for each module.
A geographical object type is defined with the following properties:
Property |
Module |
Value |
---|---|---|
IDName |
The identification name for a object type. Value example = "Pine", "Birch", "House", "Water" | |
Description |
Object description. Value example= "Water post"/> | |
DestroyEffect |
Forest Fire |
What happens when the object are in fire. Value example= "Fuel station"/> |
FireSpeed |
Forest Fire |
The fire spread factor for this object. The ignite time is multiplied with this value. Value example= "1" For more information see the fire simulation documentation. |
FuelRefillSpeed |
Logistic Fuel |
The amount of fuel this object can to deliver every second to a unit that is refilling fuel from this object. Apply on object type "fuel". Value example = "15" Module : Fuel Logistic Should only be defined if the module FuelLogistic is active. |
Image |
The Image | |
UnitMovementSpeed |
Units movement delay factor. | |
ValueEmotional |
Emotional value. | |
ValueMaterial |
Material Value. | |
WaterRefillSpeed |
Logistic Water |
The amount of water this object can to deliver every second to a unit that is refilling water from this object. Module : Water Logistic Should only be defined if the module WaterLogistic is active. |
<ObjectType
IDName = "Normal"
Description = ""
DestroyEffect = ""
FireSpeed = "1"
FuelRefillSpeed = "5"
Image = "Object/Normal.gif"
UnitMovementSpeed = "1"
ValueEmotional = "1"
ValueMaterial = "1"
WaterRefillSpeed = "5" />
Objects
The xml element Objects contains all map objects that should exist in the simulation.
Object
Defines where a map object should exist.
Configuration example:
<source>
<Objects>
<Object> ... </Object>
<Object> ... </Object>
...
<Object> ... </Object>
<Object Type = "Pine" Pos = "12,12" />
<Object Type = "Pine" Pos = "12,11" />
<Object Type = "Pine" Pos = "11,2" />
<Object Type = "Birch" Pos = "38,23" />
<Object Type = "Birch" Pos = "23,40" />
<Object Type = "Birch" Pos = "2,32" />
<Object Type = "House" Pos = "40,40" />
<Object Type = "Water" Pos = "17,22" />
<Object Type = "Fuel" Pos = "11,12" />
<Object Type = "Water" Pos = "10,10" />
</Objects>
</source>
A object is defined with the following properties:
Property |
Value |
---|---|
Type |
The object type identification number. Value example = "House" |
Pos |
Pos on the map Value example = "2, 20" |
<Source>
<Object
Type = "Pine"
Pos = "12,12"
/>
</Source>
Object Image
The image representing this object on the map should have the file name IDName with '12.gif' as a
extension ( <IDName>12.gif).
Example : Pine12.gif
The image file should be stored in the map image catalog <C3FIRE-MAP-IMAGES> , located at <C3FIRE-WWW-ROOT>/pic/
Example : C:\c3fire\www\pic\Pine12.gif
The standard experiment setting defines four object types. They are Normal, Pine, Birch and House.
The module extended setting defines an additional object type, Water. The type must be represented
of an image, named and saved according to examples above.
Standard experiment setting
Module extended setting
Water :
The different
geographical objects
Display Objects
The xml element Objects contains all map objects that should be visible on the users map at start.
DisplayObject
Defines where a map object should exist on the map.
Configuration example
<source>
<DisplayObjects>
<DisplayObject> ... </DisplayObject>
<DisplayObject> ... </DisplayObject>
...
<DisplayObject> ... </DisplayObject>
<DisplayObject Type = "Pine" Pos = "5,10" />
<DisplayObject Type = "Pine" Pos = "38,22" />
<DisplayObject Type = "Birch" Pos = "37,23" />
<DisplayObject Type = "Birch" Pos = "1,2" />
<DisplayObject Type = "Birch" Pos = "23,34" />
<DisplayObject Type = "House" Pos = "1,38" />
<DisplayObject Type = "Water" Pos = "17,22" />
<DisplayObject Type = "Fuel" Pos = "11,12" />
<DisplayObject Type = "Water" Pos = "10,10" />
</DisplayObjects>
</source>
A DisplayObject is defined with the following properties:
Property |
Value |
---|---|
Type |
The object type identification number. Value example = "House" |
PosX |
Pos on the map Value example = "5, 10" |
<Source>
<DisplayObject
Type = "Pine"
Pos = "12,12"
/>
</Source>
DestroyEffect
<DestroyEffects>
<DestroyEffect
IDName = "FuelStation"
Description = "When the fuel station is in fire it will explode, All unit in the area 3x3 will be destroyed."
DestroyTime = "0.0"
FireRadie = "2"
FireType = "Fire"
ObjectRadie = "0"
ObjectType = ""
UnitRadie = "2"
UnitType = "Destroy"
WhenFireBurnedOut = "False"
WhenInFire = "True"
WhenInFireAndOutOfWater = "False" />
</DestroyEffects>
Edit Objects on Map
Examples
Change House to School
- If you have a map with houses and want to change some house to a school follow these steps.
- Make sure that the a school object is defined in the XML ObjectTypes Tag in the definition file, Example file name
...-ObjectsTypes.coni
<ObjectTypes> <ObjectType ... <ObjectType IDName = "School" AidRefillSpeed = "0" Description = "" DestroyEffect = "" FireSpeed = "1" Image = "Object/School.gif" PeopleTransportAlwaysSendNrOfPeople = "False" PeopleTransportEnterLeaveSpeed = "0" PeopleTransportUnload = "False" PowerRefillSpeed = "0" SandbagRefillSpeed = "0" UnitMovementSpeed = "1" ValueEmotional = "1" ValueMaterial = "1" /> ...
- Make sure that the a school object is defined in the user interface object palette definition.
- XML ObjectPalette Tag is defined in the Main UI file. Example file name
...-UIMain.coni
- Resize the object panel if needed.
<UserInterfaceLayout> <Layout Name = "Ground Chief" > ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ... <ManagerConfig ... <SessionControlLayout> ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ... <ReplayConfig ... <SimulationMapLayout> ... <Object Name = "ObjectPalette" ... VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" /> ...
- XML ObjectPalette Tag is defined in the Main UI file. Example file name
- Update simulation information where the school should be.
- The positions is defined in the XML Objects tag in the definition file.
- Example file name
...MapObjectsPos.coni
<Objects> ... <Object Type = "House" Pos = "2,17" /> ...
- Pos is the position on map "x,y" / "Column,Row"
- Change "House" to "School"
- Update map information where the school should be.
- The positions is defined in the XML DisplayObjects tag in the definition file.
- Use to be the the same file as where the XML Objects tag is.
- Example file name
...MapObjectsPos.coni
<DisplayObjects> ... <DisplayObject Type = "House" Pos = "2,17" /> ...
- Pos is the position on map "x,y" / "Column,Row"
- Change "House" to "School"
Map Editor
- Description below make it possible to manipulate the map objects with the user interface and save it to disk.
- The units position is moved with the map manipulation commands described below.
- The position of the people that you can rescue in the map, are NOT updated with this tool.
- You need to manually update all the Positions.
- The people position is located in a file that have a name like.
- xxxx-PeoplePos.coni
- It contains a list of all the people in the world.
- Activation and editing steps
- In Players UI configuration in file <config_name>-UIMain-Mac.coni set ObjectPalette config to the information below.
- In most configurations the players UI is defined in <Layout Name = "Ground Chief" >.
<Layout Name = "Ground Chief" > ... <Object Name = "ObjectPalette" BorderVisible = "True" Enabeled = "true" Should be true Pos = "1222,290" Size = "120,180" Visible = "true" Should be true VisibleObjects = "" /> Should be empty
- Start the session and let the session run.
- Edit the map in player A´s UI
- You need to ignore the fire or crenate an scenario that does not start the fire.
- Save the map: Alt-S : Se description below.
- Replace the map information in the map object position definition file.
- Example: located in condition folder, <config_name>-MapObjectsPos.coni
<Objects> Insert all <Object>'s here </Objects> <DisplayObjects> Insert all <DisplayObject>'s here </DisplayObjects>
- Copy the units positions to the unit start position definition file.
- Example: located in condition folder, <config_name>-UnitsPos.coni
- Restor the Players UI configuration in file <config_name>-UIMain-Mac.coni ObjectPalette information.
- Example
<Layout Name = "Ground Chief" > ... <Object Name = "ObjectPalette" BorderVisible = "True" Enabeled = "true" Pos = "1222,290" Size = "120,180" Visible = "true" VisibleObjects = "Pine,Birch,House,School,Hospital,Tent,Water" />
- Map editing
- You can select objects in the object Palette. The selected object get a white marking.
- Then you can put the objects on the map. Point on the map an press left mouse button.
- Map manipulation
- While the session is running you can do the commands described below, (Save before session end)
- The mouse pointer needs to be on the map to make the key commands to work.
- When you are ready save the map and copy the saved object and unit positions to you configuration
- Alt-S : Save, saves the map to, ...\C3LearningLabs\C3Fire\Client\Files\Root\saved-map.txt
- or ...\C3Systems\C3Fire\Client\saved-map.txt
- Alt-R : Rotate the map clockwise
- Alt-L : Rotate the map counter clockwise
- Alt-H : Mirror horizontally
- Alt-V : Mirror vertically
- Alt-T : Mirror top right bottom left
- Alt-U : Mirror top left bottom right
Map with place names
- With some image editing it is possible to make good maps with place names.
- Background Image
- The map names should be placed in the map background image.
- What map background image that should be used is defined in the session main configuration, in the <Map> element.
- Example file name: P4-F4B4L4D4-C1-F80-HV.con (the main configuration files ends with '.con')
<Source> ... <Map IDName = "Main" ... BackgroundImage = "fhs23b-40x40.gif" ... </Source>
- All map background image files are stored in C:\C3LearningLabs\C3Fire\Client\Files\Root\Map on both sever and client (Player) computers.
- Normal Background are file for map size 40x40: Background-40x40.gif
How to steps
- To use a map with place names do the following.
- Create the c3fire map with the vegetation and hoses as normal.
- In an image editor load a background image with the grid.
- Support and example design files exist in C:\C3LearningLabs\Resources\C3Fire\Resorces\Map\fhs23a
- There exist a 40x40 grid file, Mapgrid-1.png.
- The example design files are made in the image editor program Gimp (https://www.gimp.org).
- Add map names to the background image in an image editor. Save the image file as a gif file.
- Support and example design files exist in C:\C3LearningLabs\Resources\C3Fire\Resorces\Map\fhs23a
- map-names.xcf contains example names, One layer for each name.
- FHS23b-40x40.xcf is an example file, it contain all names layers, only the selected layers are visible.
- If you use this file, then make all name layers you want to use visible and move them to position on the map.
- If you want to use C3Fire's vegetation and house icons do not insert the icons in the map image, they are inserted by the C3Fire system.
- In C3Fire the map will look like this.
- On all computers (Server and player Clients), copy the map image to. C:\C3LearningLabs\C3Fire\Client\Files\Root\Map
- In the session main configuration set the name of the map image in the <Map> element.
- Example file name: P4-F4B4L4D4-C1-F80-HV.con (the main configuration files ends with '.con')
<Source> ... <Map IDName = "Main" ... BackgroundImage = "fhs23a-40x40.gif" ... </Source>
- In the session main configuration set the map configuration so that it does not view the grid in the <Map> element.
<Source> ... <Map IDName = "Main" ... GridUse = "False" ... </Source>